Searching Algorithms: Binary Search - Complexity Analysis - Advanced Concepts

Download Q&A
Q. How many comparisons does binary search make in the worst case for an array of size n?
  • A. n
  • B. log n
  • C. n log n
  • D. 1
Q. If a binary search algorithm is implemented recursively, what is the space complexity due to recursion?
  • A. O(n)
  • B. O(log n)
  • C. O(1)
  • D. O(n log n)
Q. What happens if you apply binary search on a linked list?
  • A. It works efficiently
  • B. It does not work
  • C. It works but is slower than on arrays
  • D. It requires additional data structures
Q. Which of the following is a limitation of binary search?
  • A. It can only be used on sorted data
  • B. It is slower than linear search
  • C. It requires more memory
  • D. It cannot find duplicates
Showing 1 to 4 of 4 (1 Pages)
Soulshift Feedback ×

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

Not likely Very likely