Statistics Question:

Do you know what is binary search?

Tweet Share WhatsApp

Answer:

For binary search, the array should be arranged in ascending or descending order. In each step, the algorithm compares the search key value with the key value of the middle element of the array. If the keys match, then a matching element has been found and its index, or position, is returned. Otherwise, if the search key is less than the middle element's key, then the algorithm repeats its action on the sub-array to the left of the middle element or, if the search key is greater, on the sub-array to the right.

Download Statistics PDF Read All 31 Statistics Questions
Previous QuestionNext Question
What is binomial probability formula?Explain hash table?