GATE CS 2021 Set 2 | Question 18
Algorithms › Sorting & Searching · MCQ · 1 mark · Answer: B
- Question 18Algorithmsmcq1 markConsider a standard recursive binary search on a sorted array of elements. In the worst case, the number of comparison operations performed is:
- A.
- B.✓
- C.
- D.
Answer: B
Solution
Binary search halves the search range each step, performing operations in the worst case. - A.
More GATE PYQ on Sorting & Searching
All GATE CS Algorithms PYQ →Attempt GATE CS 2021 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →