Binary search can only be performed when the input is sorted. Although, the time complexity is lesser than that of the linear search algorithm, sorted input is the major drawback of binary search algorithm. Apart from this, binary search works best for large sorted inputs.
It's your turn to try changing the algorithm such that it works for decreasing array. And don't forget to hit the like button. Do subscribe for more videos.
Reference: Fundamentals of computer algorithms by Ellis Horowitz, Sartaj Sahni and Sanguthevar Rajasekaran
На этой странице сайта вы можете посмотреть видео онлайн Binary search | Divide and conquer | search algorithm длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Aishwarya M 11 Июнь 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 192 раз и оно понравилось 10 зрителям. Приятного просмотра!