Skip to main contentSkip to solution

Which search technique uses a ordering of elements in a list to quickly search a key?

*Note:*The elements in a list may be arranged either in ascending or descending order of their key values.

Solution

✅ Correct Option: 1

Binary search needs the list to be sorted (ascending or descending). It compares the key with the middle element and discards the half that cannot contain the key, so each step halves the search space. This takes O(log⁡n)O(\log n) time.


Linear search: checks elements one by one and does not need any ordering, so it takes O(n)O(n) time.

Hash search: uses a hash function to jump to the key's location, not the sorted order of the list.

Quick search: not a standard search technique. Quick sort is a sorting algorithm, and students often confuse the two.

Keyboard Shortcuts

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