DSA Trainer
Hash Maps

Capstone · recognize it cold

Is it even a hash maps problem?

No pattern label, no hints. Each card is a problem you have not solved here. Your only job is to read it cold and name the move. Some of these want the hash-map reflex you just drilled. Some are traps that look like hash-map problems but want something else. That second kind is the whole game: in an interview, nobody tells you the pattern, and the obvious reflex is often the wrong one.

Cold read 1 of 3

You're given a long list of transaction IDs in the order they happened. Return the ID of the FIRST transaction that is a repeat of one you've already seen.

What's the move here?