What is the key requirement for Binary Search to work correctly?
The array must have an even number of elements.
The array must be circularly sorted.
The array must have unique elements.
The array must be sorted.
Can Binary Search be used on an unsorted array?
Yes, but it will have a linear time complexity.
Yes, it will still work correctly.
It depends on the implementation of Binary Search.
No, the array must be sorted for Binary Search to function properly.
If you need to perform frequent insertions or deletions in the middle of a dataset, is binary search the most suitable choice?
Yes
No
In the worst-case scenario, how many comparisons will binary search perform on a sorted array of 16 elements?
8
16
4
32
You need to find the first occurrence of a target value in a sorted array with duplicates. Which algorithm is more efficient?
Binary search
Linear search
Can binary search be used to efficiently search for a target value in a rotated sorted array?
Yes, binary search can be directly applied.
It depends on the pivot point of the rotated array.
No, binary search is not applicable to rotated sorted arrays.
Yes, but it requires modifications to handle the rotation.
What is the primary difference between Binary Search and Interpolation Search?
Binary Search requires more memory than Interpolation Search.
Binary Search only works on sorted arrays, while Interpolation Search can work on unsorted arrays.
Binary Search always divides the array in half, while Interpolation Search estimates the position of the target element.
Binary Search is faster than Interpolation Search in all cases.
In the context of Binary Search, what is the problem with searching in an infinitely sized array?
Binary Search requires the entire array to be loaded into memory.
Binary Search cannot handle duplicate elements in an infinitely sized array.
Binary Search is too slow for infinitely sized arrays.
Binary Search cannot handle arrays with no defined end.
What is the space complexity of Binary Search (iterative implementation)?
O(log n)
O(1)
O(n)
O(n log n)
In terms of space complexity, how does the iterative binary search compare to the recursive one?
Iterative binary search generally uses less space.
Both have the same space complexity.
Recursive binary search generally uses less space.
It depends on the size of the input array.