Given a list and a number k return whether any two numbers from the list add up to k
These solutions have quadratic runtime.  You can store counts (in an object) and check the object for k-x, or sort the array, check values up to k/2 and binary search for k-x.  The second approach is asymptotically slower but constant storage.