Searching Algorithms: Binary Search - Complexity Analysis - Competitive Exam Level

Download Q&A
Q. If a binary search algorithm is implemented recursively, what is its space complexity due to recursion?
  • A. O(1)
  • B. O(log n)
  • C. O(n)
  • D. O(n log n)
Q. If the array has 16 elements, how many comparisons will binary search make in the worst case?
  • A. 4
  • B. 5
  • C. 16
  • D. 8
Showing 1 to 2 of 2 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely