Skip to main contentSkip to solution

Identify the correct order steps involved in search by using Hashing technique.

(A) An empty hash table is taken.

(B) Use the hash function, applied on the elements of a list and fill the hash table.

(C) Compare the element to search at that index with the key to declare whether the element is present in the list or not.

(D) Take a list with given elements.

Solution

✅ Correct Option: 2

(D) Take a list with given elements.

(A) Take an empty hash table.

(B) Apply the hash function to each element of the list and place it in the hash table.

(C) Apply the hash function to the key, go to that index and compare the stored element with the key to decide whether it is present.


Option 1: the alphabetical order (A), (B), (C), (D) is wrong because the list must exist before it can be hashed into the table, and the search comes last.

Keyboard Shortcuts

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