title: Find root from any node in a BST
body: <p>How can I find the root of a binary search tree from any given node? More specifically, when should I stop while going through the ancestors from any given node? Is there any function in java to get the root? Please help me.</p>