Data Structures and Algorithms20805 marksIntroduction to Searching, Search Algorithms
Explain binary search with an example. What is the time complexity of binary search?
Explain binary search with an example. What is the time complexity of binary search? [5]
Binary search is a searching algorithm that works only on a sorted list of elements. It repeatedly divides the search space in half by comparing the target element with the middle element of the current sublist, eliminating half of the remaining elements at each step. --- 1. Find the middle eleme...