Which of the following is a key difference between the iterative and recursive approaches to binary search?
Recursive binary search can only be used on arrays, while iterative binary search can be used on any data structure.
Recursive binary search uses a loop, while iterative binary search uses function calls.
Iterative binary search uses a loop, while recursive binary search uses function calls.
Iterative binary search is generally more efficient.
What happens if the target element is not present in the array during Binary Search?
It returns -1.
It returns the index where the element should be inserted.
It throws an exception.
It enters an infinite loop.
When searching for a value in a very large sorted array, which algorithm is generally more efficient?
Binary search
Linear search
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 is too slow for infinitely sized arrays.
Binary Search cannot handle duplicate elements in an infinitely sized array.
Binary Search cannot handle arrays with no defined end.
If we need to perform many searches in a sorted array, which of the following approaches will be the most efficient?
None of the above.
Performing Linear Search repeatedly.
Sorting the array once using an efficient sorting algorithm and then performing Binary Search repeatedly.
Sorting the array using Bubble Sort before each search and then performing Linear Search.
What is the key characteristic of an array that makes Binary Search applicable?
The array must be stored in contiguous memory locations.
The array must contain only positive integers.
The array must be sorted.
The array must be of a fixed size.
Can binary search be used to efficiently search for a target value in a rotated sorted array?
Yes, binary search can be directly applied.
No, binary search is not applicable to rotated sorted arrays.
It depends on the pivot point of the rotated array.
Yes, but it requires modifications to handle the rotation.
If you need to perform frequent insertions or deletions in the middle of a dataset, is binary search the most suitable choice?
Yes
No
What value does binary search return if the target element is not present in the sorted array?
Index where the element should be inserted
-1
It depends on the implementation
Null
Which of the following is a prerequisite for using binary search on a dataset?
The data must be stored in a linked list.
The data must be stored in a hash table.
The data must be sorted.
The data must contain only numerical values.