In honor of Donald Knuth's lecture series on trees, this week's episode of Algorithms Live! will cover trees. More information can be found here: http://algorithms-live.blogspot.com/2016/12/episode-1-trees-and-diameters.html
In honor of Donald Knuth's lecture series on trees, this week's episode of Algorithms Live! will cover trees. More information can be found here: http://algorithms-live.blogspot.com/2016/12/episode-1-trees-and-diameters.html
Humble request: Please do Episode 2 on Centroid Decomposition.
Episode 2 will feature our first guest and is being planned. I will cover centroid decomposition in the future though. :) I will cover finding centroids this week and many of the prerequisites for centroid decomposition.
How to find remoteness of all nodes of a tree in one DFS ?
Yes. You can modify your DFS to also keep track of the longest path coming in through the parent. Then you just have one extra path to stitch to a subtree path.
great work
Great work! A very good initiative. Keep it up...