Which of the following search algorithms can only be used on sorted arrays?
17 views
- Sequential search
- Binary search (Correct Answer)
- Tree search
- Hashing
Explanation
Answer: b) Binary search
Explanation: Binary search is a search algorithm that works by repeatedly dividing the search interval in half. It can only be used on sorted arrays, as it relies on the assumption that the elements are already in order.