I created a video talking about Dynamic Programming on Trees in context of problem H. Closer from last Div2 round. It also talks about why iterating over all the grandchildren is actually $$$O(N^2)$$$ instead of $$$O(N^3)$$$.
Video Link: https://youtu.be/9opfwMW0wWw







