Can you please tell about how we are selecting the search space?

for eg:-
if arr[ 10,20,30,40};
then the search space would be in { 10 to 100};
so why we are making it from {40 to 100};
if every painter painting one board then the min time would be 10 how it would be 40 in this case
please explain ??

Hi Anshul
Here we have considered the search space from 40 to 100 and not 10 to 100 because if the give array is {10,20,30,40} and we have total 4 painters then one painter will take 10 units of time, second 20, third 30 and fourth 40. so overall time in which all the boards are painted is 40. so minimum time being considered in search space is 40 as if we take 10 its is impossible to paint boards which require 20,30,40 units of time.
Hope its clears all ur doubts

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.