Can Binary Search be used on an unsorted array?
Yes, it will still work correctly.
Yes, but it will have a linear time complexity.
It depends on the implementation of Binary Search.
No, the array must be sorted for Binary Search to function properly.
What is the primary difference between Binary Search and 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.
Binary Search requires more memory than Interpolation Search.
In the worst-case scenario, how many comparisons will binary search perform on a sorted array of 16 elements?
16
4
8
32
In what scenario would linear search be more suitable than binary search?
Finding the smallest element in a rotated sorted array.
Finding the median value in a sorted array.
Searching for a specific value in a sorted array.
Searching for an element in a small, unsorted array.
If you need to perform frequent insertions or deletions in the middle of a dataset, is binary search the most suitable choice?
No
Yes
In the context of Binary Search, what is the problem with searching in an infinitely sized array?
Binary Search cannot handle duplicate elements in an infinitely sized array.
Binary Search cannot handle arrays with no defined end.
Binary Search is too slow for infinitely sized arrays.
Binary Search requires the entire array to be loaded into memory.
Which of the following is a key difference between the iterative and recursive approaches to binary search?
Recursive binary search uses a loop, while iterative binary search uses function calls.
Recursive binary search can only be used on arrays, while iterative binary search can be used on any data structure.
Iterative binary search uses a loop, while recursive binary search uses function calls.
Iterative binary search is generally more efficient.
What is the space complexity of Binary Search (iterative implementation)?
O(1)
O(n log n)
O(n)
O(log n)
In a rotated sorted array [5, 6, 7, 1, 2, 3, 4], what is the pivot element?
5
1
7
You have an unsorted array, and you need to find a specific value. Is it more efficient to sort the array and then use binary search, or to directly apply linear search?
Sort and then use binary search
Directly use linear search