Discuss a scenario where binary search might not be the most suitable search algorithm.

  • When the array is not sorted
  • When the array is small and unordered
  • When the array size is unknown
  • When the elements are of varying sizes
Binary search is most suitable for sorted arrays. If the array is not sorted, applying binary search becomes impractical as it relies on the property of a sorted array to efficiently locate elements.
Add your answer
Loading...

Leave a comment

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