[Help] Kth node in the path from A to B in Tree

Revision en1, by rachitiitr, 2016-02-28 13:58:30

I am solving the problem QTREE2 on Spoj. http://www.spoj.com/problems/QTREE2/ I am learning LCA and I am not able to detect the reason for WA. Could someone help me? Here is my code: http://ideone.com/KTmgd2

Tags lca, trees

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rachitiitr 2016-02-28 13:58:30 257 Initial revision (published)