Hashing: common mistakes
A map makes a lookup O(1), but what goes into it, and when, decides the answer. Here are three slips: Two Sum putting a number in before looking for its partner, Subarray Sum forgetting the empty prefix put(0, 1), and get where getOrDefault belongs.
Pick a mistake and press play: Wrong runs the code with the mistake until it breaks, and the code marks the wrong line in red. Fixed runs the corrected code on the same input, with the corrected line in green.