Please tell where my testcases are going wrong tell me the point where my code is failing.
Here is my code link: https://ide.codingblocks.com/s/196984
Painter Problem (My testcases are wrong)
My code is correct according to me i have also set start as max of the array but still the same answer.
Why are you multiplying with 5 in end result. Does time is fixed for evey testcase.
Meanwhile you can take reference from here.
But it should print correct for sample testcase right then also itβs not printing
I want to know where I am wrong why my code is not running for sample testcase also
My four testcase are wrong after changing 5 by t I want to know where I am wrong
Question does not say that the given array is sorted.
The last element does not corresponds to maximum in array.
find maximum in array and then make it start for binary search.
Your working code -: