Given a string, this function returns the first non-repeating character in the string. For example, given the input string "abcab", the function would return "c".
The candidate's solution is correct and demonstrates a level of completeness. The solution uses a dictionary to store the number of times each character appears in the string and then iterates through the string to find the first character that appears only once. The solution is optimal because it only iterates through the string once.
Evaluated at: 2022-11-18 06:15:51