Kth nearest ancestors of a node
Any approach to solve this problem. As expected making dfs calls from every vertex results in TLE
Thanks in advance!