K'th ancestor of all nodes

Revision en1, by 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 :)

Tags trees, dfs and similar

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English GrandmomPanties 2017-05-18 23:01:23 210 Initial revision (published)