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