Skip to main contentSkip to solution

What does hashing aim to achieve in searching?

Solution

✅ Correct Option: 2

Hashing uses a hash function to convert a key directly into an index (address) in a table. The record can then be reached straight from that index without scanning through the data, so search, insert and delete take O(1)O(1) time on average.


Option 1: hashing does not keep data in order; sorted order is what sorting algorithms or ordered structures provide.

Option 3: a hash value is a short fixed-size code used for locating data, but the purpose is not to shrink the stored data.

Option 4: hierarchical organisation belongs to trees, not to hash tables, which are flat arrays indexed by hash values.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question