Sort And Searching Question:

Explain what is binary search?

Tweet Share WhatsApp

Answer:

Binary search is most useful when the list is sorted. In binary search, element present in the middle of the list is determined. If the key (number to search) is smaller than the middle element, the binary search is done on the first half. If the key (number to search) is greater than the middle element, the binary search is done on the second half (right). The first and the last half are again divided into two by determining the middle element.

Download Sort And Searching PDF Read All 27 Sort And Searching Questions
Previous QuestionNext Question
Explain what is linear search?What is bubble sort algorithm in data structure sort and searching?