You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,7 @@ go clean -testcache
55
55
|[75](https://leetcode.com/problems/sort-colors/)|[Sort Colors](/medium/75_sort_colors)| medium |_`Three Pointers`_ _`DNF Algortithm`_| Initalize 3 pointers. Left and mid at 0, high at len(nums) - 1. Do a while loop as long as mid <= high and swap elements based on 3 conditions. |
56
56
|[229](https://leetcode.com/problems/majority-element-ii/description/)|[Sort Colors](/medium/229_majority_element_II)| medium |_`Counter`_ _`Hashmap`_| There can be at most 2 such elements with floor(n /3). Do a first pass to find all and eliminate all the non-qualify elements, then the second pass check how many time a each candidate appear in the original array. |
57
57
|[167](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/)|[Two Sum II - Input Array Is Sorted](/medium/167_two_sum_II_input_array_is_sorted)| medium |_`Two Pointers`_| We know that the array is sorted in asc order. We can track the total sum of 2 pointers left and right and increase or decrease their indices accordingly in a while loop |
58
+
|[15](https://leetcode.com/problems/3sum/description/)|[3Sum](/medium/15_3sum)| medium |_`Two Pointers`_| Interate through the array, initialize 2 other pointers j = i + 1 and k = n - 1 and check the sum and adjust j and k accordingly. Make sure to check duplicates |
0 commit comments