How to realize the problem is based on monotonic function

how to know when problem comes based on monotonic function because these problems seems similar to normal problems
is there any sign to know that we can use binary search in that problem?

Well its the most the difficult easiest algorithm to get right. Generally speaking you look at the allowed complexity of the solution and see that whenever the allowed complexity has to be lower than O(N^2), there might be an NlogN solution, so that’s where binary search may come into play, so you try to find a structure in the problem. But its more of practice that goes into developing an intuitive understanding of applying binary search approach to the problem. So you need to do more and more questions regarding binary search because binary search usually forms a part of the solution not the whole solution most of the times.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.