Skip to content

Commit

Permalink
add note
Browse files Browse the repository at this point in the history
  • Loading branch information
keineahnung2345 authored Apr 18, 2022
1 parent 29b424e commit 521087d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 16. 3Sum Closest.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Memory Usage: 8.2 MB, less than 100.00% of C++ online submissions for 3Sum Close

time: O(nlogn + n^2)

First sort `nums`, then iterate the sorted `nums`. In each iteration, fix `i` and move `left` and `right` toward center.

```cpp
class Solution {
public:
Expand Down

0 comments on commit 521087d

Please sign in to comment.