Here is my code:
Can someone tell what why it is giving the wrong ans?
Painter Problem
Nikhil, you need to use binary search to solve this problem. Kindly refer to this online video…
I got that but what is the problem with my code? Custom input is working fine but the ans is coming out to be wrong.
Ans needs to be calculated using binary search approach only…Pls go through this link once to implement your solution correctly ,