Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
keineahnung2345 authored Apr 18, 2022
1 parent c265b61 commit 9949b20
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 15. 3Sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## Two pointer
Runtime: 832 ms, faster than 5.06% of C++ online submissions for 3Sum.

Memory Usage: 120.6 MB, less than 5.30% of C++ online submissions for 3Sum.

```cpp
Expand Down Expand Up @@ -42,8 +43,11 @@ public:

## Two pointer, optimized
https://leetcode.com/problems/3sum/discuss/7380/Concise-O(N2)-Java-solution

Runtime: 100 ms, faster than 69.99% of C++ online submissions for 3Sum.

Memory Usage: 14 MB, less than 100.00% of C++ online submissions for 3Sum.

time: O(n^2)
```cpp
class Solution {
Expand Down Expand Up @@ -81,6 +85,7 @@ public:
## Hashmap, without sorting
https://leetcode.com/problems/3sum/discuss/227156/Java-O(N2)-using-Map
TLE
```cpp
Expand Down

0 comments on commit 9949b20

Please sign in to comment.