K'th ancestor of all nodes

Правка en1, от GrandmomPanties, 2017-05-18 23:01:23

We have a tree with n(n < 1e5) nodes and we have a constant k(k < 1e5) can we store the k'th ancestor of all nodes in an array or there is no way to do that??? Thank you for helping :)

Теги trees, dfs and similar

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский GrandmomPanties 2017-05-18 23:01:23 210 Initial revision (published)