private void printLeaves(Node root){
        if(root == null){
            return;
        }
        if(root.left == null && root.right == null){
            System.out.println(root.data);
        }
        printLeaves(root.right);
        printLeaves(root.left);
    }
http://www.geeksforgeeks.org/boundary-traversal-of-binary-tree/
Test cases
All left children
All right children
Full tree
Complete tree
src/com/interview/tree/BoundaryTraversal.java