This is the solution to the 2Sum assignment of the course Algorithms Design and Analysis 1 by Tim Roughgarden. The exercise does not ask for the implementation of the standard 2Sum problem, however for a more slightly altered version in which the algorithm must search for all possible sums within a range. Currently, the range is hardcoded and is [-10000, 10000]. Also, it is important that the solutions discovered are unique. So that means that in order to lower the running time, instead of doing a naive solution
go run main.go
Should print something like "There are 1000 sums"
--debug: get all the output
--intfile=/path/to/intfile : path to file that contains all the integers that will be processed
##Disclaimer
I have posted this solution here for anyone who needs a little bit of help. There is absolutely no reason to start the course and then go around and download the solutions to all the assignments. Use this to get inspiration or to check the results of your own solution.