1. Home
  2. Computer Science MCQs
  3. Algorithms and Data Structures
  4. What is the time complexity of binary search?

Added 20 Jan 2024

What is the time complexity of binary search?

  1. O(1)
  2. O(n)
  3. O(log n) Correct answer
  4. O(n²)

Correct answer

C. O(log n)

15 views

MCQSEXAM

Explanation

Binary search has O(log n) time complexity.

Reference

Asked in: GATE, UGC NET

https://www.geeksforgeeks.org/binary-search/

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Algorithms and Data Structures MCQs

Practise all Algorithms and Data Structures MCQs

Similar MCQs