Binary search can lead to _______ when applied to non-sorted arrays, yielding incorrect results or infinite loops.

  • Linear
  • Optimal
  • Quadratic
  • Unpredictable
Binary search can lead to unpredictable behavior when applied to non-sorted arrays. Without the assurance of sorted elements, the algorithm may yield incorrect results or even result in infinite loops.
Add your answer
Loading...

Leave a comment

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