BINARY SEARCH IN MONOTONIC SEARCH

CAN YOU PLEASE EXPLAIN THE TIME COMPLEXITY OF THIS CODE WHAT BHAIYA HAS EXPLAINED IN THE VIDEO?

@CODER_JATIN,
Complexity of binary search is O(log(n)) because in each iteration you divide the search space in two halves, so the maximum number of iterations you can do is log2(n).

okay and bhaiya, what is the meaning of search_space(monotonic).

@CODER_JATIN,
Search space is the total set of element you have to search something from, and monotonic just means something that follows a fixed nature, per say increasing or decreasing.
So while searching for a desired page in a book, initially, all pages are in search space, but then you randomly open a page and the decide to go back or forward, depending where your desired page would lie, now search space has been reduced to first or second half of the book. Similarly, you can reach to the required page in log(n) steps. Also here monotonicity is the increasing order of page numbers, which help us to accurately determine in which direction should we pursue our search.

okay , thank you ji. . .