Kth nearest ancestors of a node

Revision en1, by monsij, 2018-09-24 08:16:40

Any approach to solve this problem. As expected making dfs calls from every vertex results in TLE

Thanks in advance!

Tags #trees, ancestor

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English monsij 2018-09-24 08:16:40 203 Initial revision (published)