You've learned two effective patterns. 3Sum showed the "fix one, two-pointer the rest" pattern. By sorting first and using two pointers, you reduced to . Longest Substring Without Repeating introduced sliding window. You maintain a window of valid elements, expanding when possible, shrinking when necessary. Container With Most Water demonstrated greedy two pointers: start wide and move the pointer that limits your current answer. The main idea for two pointers: when the problem involves pairs or ranges in a sorted array, two pointers from opposite ends often work. For sliding window: when looking for subarrays/substrings with some property, maintain a dynamic window.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/maang-interview-prep/two-pointers-sliding-window/section-recap
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████████████████████████████████████████████████████████████████████████████████