Incredible hulk problem

I’m trying to solve this problem using binary search but didn’t pass any test cases

hello @ajayrajsingh_817
yeah i think this problem can be solved using binary search.
the issue might be with ur condition that u r checking to update ur s/e.

try this alternate solution->https://www.youtube.com/watch?v=A1H8L7hQ3pE

can you plzz provide me correct condition for checking n guide me where i’m wrong

hello @ajayrajsingh_817
sorry bro u cannot use binary search .
consider this example
3 ( minimum steps 2)

4 (minimum steps 1)

clearly our search space is not montonic.