Practice
Learn
← Quit
0 / 0 correct
Algorithms
Medium
1 of 40
Why is hashing used to detect duplicates in O(n) instead of sorting?
A
Sorting can't find duplicates
B
Hashing preserves order
C
Each insert/lookup in a hash set is O(1) average, versus O(n log n) for sorting
D
Hashing uses no memory