Vikash Yadav37w

couldn't understand logic of taking max(it1+1, it2) could you make it more simple.

lest take an example of a tree with three child and k = 4. each child return (1 → 2) so answer is 18 but by doing your logic calculation 26.

Read more… (44 words)