5 min read
development A deeper look at "Contains Duplicate": why the brute force and sorting approaches fall short, how a hash set gets you to linear time, and when a plain boolean array beats hashing altogether.
A deeper look at "Contains Duplicate": why the brute force and sorting approaches fall short, how a hash set gets you to linear time, and when a plain boolean array beats hashing altogether.