I'm writing an algorithm where I look for pairs of values which when added together results in another value I'm looking for.
I figured out that using a Map will speed up my algorithm from O(n²). I later realized that I don't really use the values contained in my Map so a List will suffice.
I did a power search on Google but I did not find any information on the asymptotic running time of those methods in the title of my question.
Can you point out where should I look for such information?