Skip to main contentSkip to solution

Searching a dictionary or a telephone directory or finding the element with minimum value or maximum value in a sorted list, etc. are the applications of _______________.

Solution

✅ Correct Option: 4

Binary search works on sorted data. It compares the target with the middle element and discards half of the list each time, so it takes O(log⁡n)O(\log n) time.

A dictionary or telephone directory is sorted alphabetically, so you open near the middle and keep halving the range. In a sorted list, the minimum and maximum sit at the ends, so they are found by using the sorted order.


Linear Search: it checks elements one by one and does not use the sorted order. It takes O(n)O(n) time.

Hashing: it finds an item directly from a hash of its key and does not depend on sorted order.

Bubble Search: no such search algorithm exists. Bubble Sort is a sorting algorithm, so the name is a trap.

Keyboard Shortcuts

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