Hash Pair Duel
Find the hidden pair that sums to the target, and learn to think in complements, the insight that turns O(n²) pair-checking into one hash-map pass.
How to play
- Each round deals a hand of number cards and a target sum.
- Click two cards you believe add up to exactly the target.
- After your first pick, the game tells you the complement a hash set would look up, use it.
- Correct pairs advance the round (hands get bigger); misses cost accuracy and earn the lesson anyway.
Hash Pair Duel
Two-sum is the gateway problem of hash thinking: instead of comparing every pair (O(n²)), store what you have seen and ask each new value for its complement (O(n)). Five rounds, bigger hands each time.
Estimated play time: 3–5 min. Scores feed your local progress, stored only in this browser.