Which searching algorithm requires the elements to be in sorted order?

  • Binary search
  • Depth-first search
  • Hashing
  • Linear search
Binary search requires the elements to be in sorted order because it uses the principle of divide and conquer, comparing the middle element and eliminating half of the search space in each step.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *