Is two pointer problem same as sliding window
Sliding window algorithms can be implemented with a single pointer and a variable for window size. Typically we use all of the elements within the window for the problem (for eg – sum of all elements in the window). Two pointer technique is quite similar but we usually compare the value at the two pointers … Read more