Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 268 Bytes

README.md

File metadata and controls

12 lines (9 loc) · 268 Bytes

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:

  1. Why attemp 2 is O(nlog n) ?