public List<Integer> distanceK(TreeNode root, TreeNode target, int k) {
        List<Integer> list = new ArrayList<>();
        if (root == null || target == null || k < 0)
            return list;
        if (k == 0) {
            list.add(target.val);
            return list;
        }
        Map<TreeNode, Set<TreeNode>> map = new HashMap<>();
        map.put(root, new HashSet<>());

        map.get(root).add(root.left);
        map.get(root).add(root.right);

        go(map, root.left, root);
        go(map, root.right, root);

        return bfs(map, target, k);
    }
Why Did you create this class? what does it do?
src/problems/medium/AllNodesDistanceKinBinaryTree.java