Have I Seen This Before?
The simplest way to spot duplicates. A quick puzzle to sharpen your brain.
Puzzle
Given an integer array, return true if any value appears at least twice, otherwise return false.
Example
[1, 2, 3, 1] → true
[1, 2, 3, 4] → false
Hints (use only if stuck):
Hint 1: You care about seen vs unseen values.
Hint 2: Aim for O(n) time, not nested loops.
Hint 3: Ask yourself what data structure naturally answers “have I seen this before?”
Solve it cleanly. Small, expressive code.
Consistency unlocks harder puzzles.

