GATE DA 2024, Q.40: Worst-case comparisons of binary search
The question
F(n) is the maximum number of comparisons binary search makes on a sorted array of size n. Which is TRUE?
- (A) F(n) = F(⌊n/2⌋) + 1
- (B) F(n) = F(⌊n/2⌋) + F(⌈n/2⌉)
- (C) F(n) = F(⌊n/2⌋)
- (D) F(n) = F(n − 1) + 1
Checking your access…
The answer and full solution are in the GATE DA past-paper pack. All 195 questions from 2024, 2025 and 2026, each solved step by step and checked against the official key. ₹499, lifetime access.
What's in the pack · 60 questions are free to try.
Unlock this solution and every other question. ₹499, one payment, lifetime access.
Could not load the solution. Refresh the page, or email hello@gradientlab.dev.
Source: official GATE DA 2024 question paper and answer key (IISc Bengaluru). The question is lightly reworded; every number and option is kept.