Deep copy HashSet
HashSet<Integer> set = new HashSet<Integer>();
HashSet<Integer> set2 = new HashSet<Integer>();
set2.addAll(set);
or
HashSet<Integer> set = new HashSet<Integer>();
HashSet<Integer> set2 = new HashSet<Integer>(set);
Deep copy HashMap
HashMap<Integer, Integer> map = new HashMap<>();
HashMap<Integer, Integer> map2 = new HashMap<>();
map2.putAll(map);
or
HashMap<Integer, Integer> map = new HashMap<>();
HashMap<Integer, Integer> map2 = new HashMap<>(map);
Anyway, Good luck, Richardo! — 09/27/2016