public Map<String, List<Integer>> deepCopy(Map<String, List<Integer>> map) {
Map<String, List<Integer>> res = new HashMap<>();
for (String s : map.keySet()) {
res.put(s, map.get(s));
}
return res;
}
This method is to make a deep copy of a map. I believe there's some problems in the method I wrote, but I couldn't find out