Question:

Which of the following are the applications of binary search?
(A) Telephone Directory
(B) Finding the element with a minimum or maximum value in a sorted list
(C) Implementing routing tables
(D) Indexing in database
Choose the correct answer from the options given below:

Show Hint

Binary search works on sorted data. Check whether each item stores sorted data that is looked up by value.
Updated On: Oct 1, 2026
  • (A), (B) and (D) only
  • (A), (B) and (C) only
  • (A), (B), (C) and (D)
  • (B), (C) and (D) only
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Understanding the Concept:
Binary search works on a sorted collection. It compares the key with the middle item and throws away half of the list each time. So any task that looks up values in sorted data can use it.

Step 2: Key Formula or Approach:
For each application, ask one question: is the data kept in sorted order, and do we need to look something up in it? If yes, binary search fits.

Step 3: Check application (A):
A telephone directory is arranged in alphabetical order. To find a name we open near the middle, decide which half holds the name, and repeat. This is binary search, so (A) is correct.

Step 4: Check application (B):
In a sorted list the smallest value sits at one end and the largest at the other. Locating a value or its position using the order of the list is done with the same halving idea (for example, finding the first or last position of a value). So (B) is accepted as correct.

Step 5: Check application (C):
Routing tables keep address ranges in sorted order. A router finds the matching entry for an address by searching this sorted table, and binary search makes the lookup fast. So (C) is correct.

Step 6: Check application (D):
A database index is a sorted structure on a column. The database looks up a key in the index by halving the search range, which is binary search. So (D) is correct.

Step 7: Match with the options:
All four items (A), (B), (C) and (D) are valid uses. Option 1 leaves out (C), option 2 leaves out (D), and option 4 leaves out (A). Only option 3 includes all four.

Final Answer:
All four are applications of binary search, which is option 3.
\[ \boxed{\text{(A), (B), (C) and (D)}} \]
Was this answer helpful?
0
0