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.
Sorting the array once using an efficient sorting algorithm and then performing Binary Search repeatedly.
Performing Linear Search repeatedly.
Sorting the array using Bubble Sort before each search and then performing Linear Search.
You have a sorted array that has been rotated an unknown number of times. Which algorithm is best suited for finding a specific element in this array?
Linear Search
Binary Search
Jump Search
Interpolation Search
Which of the following best describes the advantage of binary search over linear search?
Binary search can be used on unsorted data.
Binary search uses less memory.
Binary search has a faster average-case time complexity.
Binary search is easier to implement.
When searching for a value in a very large sorted array, which algorithm is generally more efficient?
Binary search
Linear search
What is the primary advantage of using binary search over linear search for a sorted array?
Binary search can handle duplicate elements more efficiently.
Binary search has a faster time complexity in most cases.
What value does binary search return if the target element is not present in the sorted array?
Index where the element should be inserted
It depends on the implementation
-1
Null
What is the space complexity of Binary Search (iterative implementation)?
O(1)
O(log n)
O(n log n)
O(n)
Which data structure inherently benefits from the efficiency of binary search for searching operations?
Linked List
Hash Table
Queue
Binary Search Tree
What is the key characteristic of an array that makes Binary Search applicable?
The array must contain only positive integers.
The array must be stored in contiguous memory locations.
The array must be sorted.
The array must be of a fixed size.
In a rotated sorted array [5, 6, 7, 1, 2, 3, 4], what is the pivot element?
4
5
7
1