ISRO Computer Science (CSE) 2007 - Question 59

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2007

The time taken by binary search algorithm to search a key in a sorted array of n elements is

  • A. O(log_2 n)
  • B. O(n)
  • C. O(n log_2 n)
  • D. O(n²)

Answer: A. O(log_2 n)

Explanation: Binary search is logarithmic.

| | All questions of ISRO Computer Science (CSE) 2007