Return the index of the first character in s that appears exactly once in the whole string, or -1 if every character repeats (or the string is empty).
Example 1
Input:
first_unique_character('leetcode')
Output:
0
l at index 0 appears once.
Example 2
Input:
first_unique_character('aabb')
Output:
-1
Every character repeats.
0 <= len(s) <= 3 * 10**5s contains lower-case letters.No results yet
Run your code to check it against the examples, or submit to run every test.