Skip to main content

Arrays & hashing · 5 minutes

Spot a duplicate efficiently

Get feedback on your answer. No account needed.

You scan an unsorted list once. Which structure lets you check whether an integer was already seen in expected O(1) time?

Your answer
Need a small hint?

Think about membership lookup, not the order of the values.

This helps us choose when to schedule your next review.