Although this problem is tagged with “binary search” but still I am not able to come up with a solution using it. Please help with the underlying concept (solution and any further analysis also,if possible).
Thank you so much. It took me some time to understand the application of BS on monotonic function but now I have understood it well.
Thanks once again.