Re-rooting Tree DP?

Правка en1, от omggg, 2020-03-24 13:25:21

I am facing issues in questions in which Given is a tree with no fixed root, n<=1e5 . I can simply do the question if i traverse the tree for each node as root (n^2) but it gives TLE. I know i have to apply DP and rerooting concept.

Can anyone provide me a blog for this particular topic? Or some handful questions on that to learn with the topic? (my rating:1600)

Any help is appreciated. Thanks

Теги #dp, #trees, #graph, #dynamic programming, dp on trees, dp on graphs, re-rooting, non rooted tree

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский omggg 2020-03-24 13:25:21 424 Initial revision (published)