void findDeepNodes(Set<TreeNode> set, TreeNode x) {
        Queue<TreeNode> q = new LinkedList<>();
        q.add(x);
        int count = 1;
        while (!q.isEmpty()) {
            TreeNode current = q.remove();
            count--;
            if (current.left != null)
                q.add(current.left);
            if (current.right != null)
                q.add(current.right);
            if (count == 0) {
                count += q.size();
                if (q.size() > 0) {
                    set.clear();
                    set.addAll(q);
                }
            }
        }

    }
Why Did you create this class? what does it do?
src/problems/medium/SmallestSubtreewithalltheDeepestNodes.java