Here is the interview question prompt, presented for reference.
You're given a string of random alphanumerical characters with a length between
Write a method to return the first character in the string that does not repeat itself later on.
firstNonRepeat('asdfsdafdasfjdfsafnnunl') should return
Ais the number of ASCII characters
You can see the full challenge with visuals at this link.
Challenges • Asked over 3 years ago by Jake from AlgoDaily
This is the main discussion thread generated for Find First Non-Repeating Character.
Hello! Why does the 2nd loop of the solution went through char in charCounter instead of char in str?
My bad and sorry for the late response! You're 100% correct, I've updated the solution code and added a node in the tutorial to reflect this.