GATE CS 2021 Set 2 | Question 18

Algorithms › Sorting & Searching · MCQ · 1 mark · Answer: B

  1. Question 18Algorithmsmcq1 mark
    Consider 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.

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 →