Remove Duplicates from Sorted Array in Java
This is the array version of sorted duplicate compaction. Because the input is sorted, duplicates appear in blocks, which makes one-pass in-place deduplicati...
This is the array version of sorted duplicate compaction. Because the input is sorted, duplicates appear in blocks, which makes one-pass in-place deduplicati...
This problem looks like repeated string cleanup, but the real pattern is stack simulation. Whenever a new character cancels the previous one, we want to “und...
This problem looks like a string problem at first, but there is a neat numeric solution. The clean trick is to reverse only half of the digits instead of rev...
This is one of the best introductory fast-and-slow pointer problems. It looks simple, but it teaches a pattern that later shows up in cycle detection, palind...
This is one of the most important sliding-window problems. The goal is not to generate every substring, but to maintain one valid window whose characters are...