If you need to perform frequent insertions or deletions in the middle of a dataset, is binary search the most suitable choice?
No
Yes
Can Binary Search be used on an unsorted array?
It depends on the implementation of Binary Search.
No, the array must be sorted for Binary Search to function properly.
Yes, but it will have a linear time complexity.
Yes, it will still work correctly.
What is the space complexity of Binary Search (iterative implementation)?
O(n log n)
O(log n)
O(1)
O(n)
When searching for a value in a very large sorted array, which algorithm is generally more efficient?
Linear search
Binary search
In terms of space complexity, how does the iterative binary search compare to the recursive one?
Recursive binary search generally uses less space.
Iterative binary search generally uses less space.
Both have the same space complexity.
It depends on the size of the input array.
What is the time complexity of Binary Search in the best-case scenario?
Which of the following best describes the time complexity of binary search in the average case?
In a rotated sorted array [5, 6, 7, 1, 2, 3, 4], what is the pivot element?
1
5
7
4
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.
In binary search, what happens if the target value is less than the middle element of the current search interval?
The search terminates as the target is not found.
The search continues in the left half of the interval.
The middle element is compared with its adjacent elements.
The search continues in the right half of the interval.