Most interview problems are a known pattern in a new story. The fastest way to the right one is to read the constraints before the story: how big is n, is the data sorted, does it change, and is the question about one contiguous stretch, many arbitrary ranges or a single pass?
Some signals are reliable. "Contiguous" plus "longest" or "shortest" points to a sliding window. "Many range totals on fixed data" points to prefix sums. "Many range updates, read once at the end" points to a difference array. A sorted array plus a pair condition points to two pointers. "Seen before" in one pass points to a hash map. A natural order plus a choice that never blocks later choices points to a greedy rule, but only once you can state the exchange argument.
Each question names a constraint that rules out the other options. Find it, then check your answer.
Read the constraints first; they rule out most patterns.