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 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
Answer: A. O(log_2 n)
Explanation: Binary search is logarithmic.
Previous question | Next question | All questions of ISRO Computer Science (CSE) 2007