Your question is First Unique Character Index. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
At Spotify, you are given a lowercase string s and need to find the index of the first character that appears exactly once. If no such character exists, return -1.
s containing only lowercase English letters.-1 if every character repeats.def first_unique_char(s):