You are given a string s.
Your task is to locate the first character that appears exactly once in the entire string.
Return the index of that character.
If no such character exists, return -1.
Input: s = "swiss"
Output: 1
Explanation:
'w' is the first non-repeating character.
Input: s = "aabcbd"
Output: 3
Explanation:
Characters: 'a' repeats 'b' repeats 'c' repeats 'd' at index 4 is the first character appearing once.
Input: s = "zzxxcc"
Output: -1
Explanation:
Every character occurs more than once.
Accepted:
Submission: