Advertisement
RaFiN_

how to check ancestor without LCA

Aug 31st, 2019
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.10 KB | None | 0 0
  1. how to check ancestor without LCA
  2.  
  3. if v is ancestor of u
  4.  
  5. then in[v] <= in[u] and out[v] > out[u]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement