NVIDIA Interview Question

Give a tree, check if one nodes come before another node