Informatica Interview Question

Find the first non repeating character

Interview Answer

Anonymous

Mar 25, 2021

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