Write first_unique(s) returning the index of the first character that appears exactly once, or -1.
first_unique(s)
-1
first_unique('leetcode') → 0
first_unique('aabb') → -1
Submit runs 5 tests, including hidden edge cases.
Run your code to see the output here.