## Notes This is a technique for finding two numbers in a sorted array whose sum equal a target value. One pointer starts at the left of the array; another pointer starts at the right of the array. If their sum is less than the target value, move the left pointer to the right. Else if the sum is greater than the target value, move the right pointer to the left. Else we've found the target sum. ## Problems ### Easy - [x] [Remove Occurrences](https://www.geeksforgeeks.org/dsa/remove-element/) - [x] [Move Zeros To End](https://www.geeksforgeeks.org/dsa/move-zeroes-end-array/) - [x] [Unique Elements in Sorted Array](https://www.geeksforgeeks.org/dsa/remove-duplicates-sorted-array/) - [x] [Reverse a string preserving space positions](https://www.geeksforgeeks.org/dsa/reverse-string-preserving-space-positions/) - [ ] [Sort an array of 0s, 1s and 2s](https://www.geeksforgeeks.org/dsa/sort-an-array-of-0s-1s-and-2s/) - [ ] [Two Sum](https://www.geeksforgeeks.org/dsa/check-if-pair-with-given-sum-exists-in-array/) - [ ] [Pair Sum in a Sorted and Rotated Array](https://www.geeksforgeeks.org/dsa/given-a-sorted-and-rotated-array-find-if-there-is-a-pair-with-a-given-sum/) - [ ] [Closest Pair Sum](https://www.geeksforgeeks.org/dsa/2-sum-pair-sum-closest-to-target/) - [ ] [Closest pair from two sorted arrays](https://www.geeksforgeeks.org/dsa/given-two-sorted-arrays-number-x-find-pair-whose-sum-closest-x/) - [ ] [Smallest Subarray > Sum](https://www.geeksforgeeks.org/dsa/minimum-length-subarray-sum-greater-given-value/) - [ ] [Dominant Pairs](https://www.geeksforgeeks.org/dsa/find-the-number-of-dominant-pairs/) - [ ] [Sentence Palindrome](https://www.geeksforgeeks.org/dsa/sentence-palindrome-palindrome-removing-spaces-dots-etc/) - [ ] [Intersection of Arrays with Distinct](https://www.geeksforgeeks.org/dsa/intersection-of-two-arrays-with-distinct-elements/) ### Medium - [ ] [Count pairs with absolute difference equal to k](https://www.geeksforgeeks.org/dsa/count-pairs-difference-equal-k/) - [ ] [Triplet Sum in Array](https://www.geeksforgeeks.org/dsa/find-a-triplet-that-sum-to-a-given-value/) - [ ] [Sum of Two Equals Third](https://www.geeksforgeeks.org/dsa/find-triplet-sum-two-equals-third-element/) - [ ] [K-th element of two Arrays](https://www.geeksforgeeks.org/problems/k-th-element-of-two-sorted-array1317/1) - [ ] [Union of 2 Sorted with Duplicates](https://www.geeksforgeeks.org/problems/union-of-two-sorted-arrays-1587115621/1?page=1&category=two-pointer-algorithm&sortBy=submissions) - [ ] [Subarrays with Max in Range](https://www.geeksforgeeks.org/dsa/number-subarrays-maximum-value-given-range/) - [ ] [Longest Substring with K Unique](https://www.geeksforgeeks.org/dsa/find-the-longest-substring-with-k-unique-characters-in-a-given-string/) - [ ] [Remove and Reverse](https://www.geeksforgeeks.org/dsa/remove-repeating-chars-and-reverse-string-until-no-repetitions/) - [ ] [The Celebrity Problem](https://www.geeksforgeeks.org/dsa/the-celebrity-problem/) ### Hard - [ ] [Trapping Rain Water Problem](https://www.geeksforgeeks.org/dsa/trapping-rain-water/) - [ ] [4 Sum - Check for Quadruple](https://www.geeksforgeeks.org/dsa/find-four-numbers-with-sum-equal-to-given-sum/) - [ ] [4 Sum – All Distinct Quadruplets with given Sum](https://www.geeksforgeeks.org/dsa/find-four-elements-that-sum-to-a-given-value-set-2/)