void pop(TreeNode x) {
        int l = 1;
        Queue<TreeNode> q = new LinkedList<>();
        q.add(x);
        List<TreeNode> list = new ArrayList<>(q);
        map.put(1, list);
        level = 1;
        while (!q.isEmpty()) {
            l--;
            TreeNode c = q.remove();
            if (c.left != null)
                q.add(c.left);
            if (c.right != null)
                q.add(c.right);
            if (l == 0 && q.size() > 0) {
                l += q.size();
                map.put(++level, new ArrayList<>(q));
            }
        }
    }
Why Did you create this class? what does it do?
src/problems/medium/CBTInserter.java