Hi!
I tried my own appraoch to this problem using binary search, before i saw the tutorial.
Even though my code seems to be working fine, im not passing the hackerblocks testcases. Please go through my appraoch ( at : https://ide.codingblocks.com/s/300779) and assist me in finding what testcase/issue i am missing.
I have used a similar appraoch with the same monotonic search space and binary search algorithm.
Thanks for yout help, it is really appreciated.