I\'m having problem figuring out how to check from users input letters that were repeated. Program needs to output repeated letter as true and if there isn\'t any then as false.
We can reduce to Single loop with this.
boolean checkDuplicates(char[] x) { Set xSet = new HashSet(); for (char c : x) { if (xSet.contains(c)) return true; xSet.add(i); } return false; }