here is the link to the question ZERO THE PATH asked in insomnia qualifier 2019
We start from leaves, and keep going above.
We do dp when we are going from bottom to up.
Detailed solution: Will add after 3-4 hours.
Can you explain further?
Yes, sure, I am planning to write an editorial on it !