Node stripLeaves(Node root, List<Integer> leaves) {
        if (root == null) {
            return null;
        }
        if (root.left == null && root.right == null) {
            leaves.add(root.data);
            return null;
        }
        root.left = stripLeaves(root.left, leaves);
        root.right = stripLeaves(root.right, leaves);
        return root;
    }
Date 10/08/2016
@author Tushar Roy

Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves, repeat until the tree is empty.

Time complexity O(n^2) for unbalanced tree.

https://leetcode.com/problems/find-leaves-of-binary-tree/
src/com/interview/tree/LeavesOfBinaryTree.java