Which of the following features with respect to Binary Search algorithm are correct?
(A) List should be arranged in either an ascending or descending order of their key values.
(B) The key to be searched is compared with the element in the middle of a sorted list.
(C) If the middle element is greater than or less than the key, it means that the key is present in either half of the list and repeats the process in the halfs.
(D) The key to be searched is compared with the first element of the sorted list.
Which of the following features with respect to Binary Search algorithm are correct?
(A) List should be arranged in either an ascending or descending order of their key values.
(B) The key to be searched is compared with the element in the middle of a sorted list.
(C) If the middle element is greater than or less than the key, it means that the key is present in either half of the list and repeats the process in the halfs.
(D) The key to be searched is compared with the first element of the sorted list.
Solution
Binary search needs a sorted list (ascending or descending), so (A) is correct. It compares the key with the middle element of the sorted list, so (B) is correct. If the middle element is greater or smaller than the key, the key can lie only in one half, and the same process is repeated on that half, so (C) is correct.
(D): comparing the key with the first element is linear search, not binary search.
Related questions:
2026: 19 May Shift 1
2025: 14 May Shift 1
2025: 16 May Shift 1
2026: 23 May Shift 1
2026: 19 May Shift 1