Apr 18, 2026
Does a binary search algorithm require the input array to be sorted before it can correctly find an element?
Correct
Answer given
yes
Answer
Yes. Binary search works by repeatedly halving the search space, which only works correctly if the elements are in sorted order.
Ash's grade
Correct, binary search requires a sorted array to function properly.