linkedhashset

What are the pros and cons of LinkedHashMaps vs. LinkedHashSets?

I was just wondering if someone could espouse for me the main benefits for choosing one over the other and the detriments that come with that choice. ...

Using the keySet() method in HashMap

I have a method that goes through the possible states in a board and stores them in a HashMap void up(String str){ int a = str.indexOf("0"); if(a>2){ String s = str.substring(0,a-3)+"0"+str.substring(a-2,a)+str.charAt(a-3)+str.substring(a+1); add(s,map.get(str)+1); if(s.equals("123456780")) { System.out.println("The sol...