Open In App

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

Last Updated : 25 Jul, 2023
Like Article
Like
Save
Share
Report

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

(A)

The array should not be too long

(B)

The array should of more size

(C)

The array should be sorted 

(D)

None of these


Answer: (C)

Explanation:

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