Function to find nodes common to given two nodes
public static bool findCommonNodes ( Node root , int first , int second ) { Node LCA = findLCA ( root , first , second ) ; if ( LCA == null ) { return false ; } printAncestors ( root , LCA . data ) ; return true ; }