Find the first non repeating character
Anonymous
Interviewer asked me to write the code in a word document without auto completion assistance This was the program I wrote and the interviewer public static int nonRepeatingCharacters(String str1) { Set strSet = new HashSet(); char temp; int maxCount=0; for (int i = 0; i (); strSet.add(temp); } maxCount= maxCount> strSet.size()?maxCount:strSet.size(); } return maxCount; } Not sure what he was expecting out of me. Quite disappointed overall
Check out your Company Bowl for anonymous work chats.