Question DSA-HASH-0080
HardWhy is a hash set a poor choice when you need the elements in sorted order?
- A.
Hash sets are always sorted
- B.
Hash sets can't store numbers
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Hashing question
Why is a hash set a poor choice when you need the elements in sorted order?
Hash sets are always sorted
Hash sets can't store numbers
Sign up free to see the answer and a step-by-step explanation.
Hash sets keep insertion order only
Hashing scatters elements, so getting them in order needs an O(n log n) sort