public int printNodes(Node root,int dest, int k){
        if(root == null){
            return -1;
        }
        
        if(root.data == dest){
            findInChild(root, k);
            return k-1;
        }
        
        int found = printNodes(root.left,dest,k);
        if(found != -1){
            if(found == 0){
                System.out.println(root.data);
            }else{
                findInChild(root.right, found-1);
            }
            return found -1;
        }
        
        found = printNodes(root.right,dest,k);
        if(found != -1){
            if(found == 0){
                System.out.println(root.data);
            }else{
                findInChild(root.left, found-1);
            }
            return found-1;
        }
        return -1;
    }
http://www.geeksforgeeks.org/print-nodes-distance-k-given-node-binary-tree/
Test case 
k should not be negative
k could be very big number which means nothing was found
dest might/might not exists in the tree
root could be null
src/com/interview/tree/NodesAtDistanceK.java