Most coding interview questions are not unique. They are variations on a small set of patterns. Once you can recognize the pattern, you stop memorizing individual answers and start seeing the shape of a problem the moment you read it. That is what separates people who grind hundreds of problems from people who solve new ones calmly.

Here are the patterns that cover the large majority of interview questions: what each one is for, and the tell that should make you reach for it.

Two pointers

Two indices walk through a sequence, usually from opposite ends or at different speeds, so you avoid a nested loop.

The tell: a sorted array or string, and you are looking for a pair, a triplet, or a property that compares the two ends. Reversing in place, checking a palindrome, and "two sum on a sorted array" are all two pointers.