ISRO 2007 · Linear Search & Binary Search

MCQ · 1 mark · Problem PROG-SRCH-0010

The time taken by binary search algorithm to search a key in a sorted array of n elements is
  1. A
    \(O (\log_2 \: n)\)
  2. B
    \(O (n)\)
  3. C
    \(O (n \log_2 \: n)\)
  4. D
    \(O (n^2)\)

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/49626/isro2007-59

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com