public boolean printDistance(BSTNode<T> root, BSTNode<T> node1, BSTNode<T> node2, LinkedList<BSTNode<T>> queue) {
        if(root != null) {
            //if either of the nodes match with root
            if(root == node1 || root == node2) {
                // do the counting down logic
                BSTNode<T> target = null;
                BSTNode<T> source = null;
                // decide which node is yet to be found
                if(root == node1) {
                   target = node2;
                   source = node1;
                } else {
                    target = node1;
                    source = node2;
                }

                // try finding the other node down in the subtrees of found node ..
                if(!findOtherAndPrint(root,target,0)) {
                    // if not found under the subtree of found node .. go to ancesstors
                    while(!queue.isEmpty()) {
                        BSTNode<T> node = queue.remove();
                        // find the second node in the ancestors while restricting route going through found Node
                        if (findOtherAndPrint(node,target, source,queue.size()+1)) {
                            return true;
                        }
                    }
                }
                return true;
            }

            // add the root to the queue
            queue.add(root);

            boolean found = printDistance(root.left, node1, node2,queue);
            if(!found) {
                found = printDistance(root.right, node1, node2, queue);
            }
            return found;
        }
        return false;
    }