This site uses one functional cookie to keep feature rollouts consistent for you. Nothing is set until you choose. See the privacy notice.
Read the statement and name the pattern before you think about code. Spotting it is most of the battle, and it's the part that goes when you only ever practise one topic at a time. Misses come back tomorrow; hits drift further out each time.
0 due · 223 new · 223 cards
The problem
Given an integer array, return true if any value appears at least twice, and false if every element is distinct. Contains duplicate, in short.