Search space in EKO-spoj problem

how the end part of search space becomes sum of the array elements.
i’m totally totally confused.

hello @prashantrsj25

when miroco will put saw at height 0 them in that case he will cut every tree from root right?
in that case answer will be summation of height of all tree .
and becuase that is the maximum possible answer it should be our end part of search space

“he will cut every tree from tree right?”

meaning of this line

i mean to say he will cut tree from root.
that was typing mistake ignore that

okay, thank you bhaiya !

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.