Open In App

Top | MCQs on Binary Search Algorithm with Answers | Question 12

Last Updated : 25 Jul, 2023
Like Article

The necessary condition for using binary search in an array is :-


The array should not be too long


The array should of more size


The array should be sorted 


None of these

Answer: (C)


To apply binary search on an array, the array should be sorted. Binary Search is defined as a searching algorithm used in a sorted array by repeatedly dividing the search interval in half. The idea of binary search is to use the information that the array is sorted and reduce the time complexity to O(log N). 

Hence Option(C) is the correct answer.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads