Two sum Attempts: # Time Complexity Space Complexity Description 1 O(n^2) ? Brute force 2 O(nlog n) ? 2 pointers 3 O(n) O(n) Hash table Follow up: Why attemp 2 is O(nlog n) ?