Search for a command to run...
s, return the index of the first non-repeating character.-1.
s = "leetcode"
0
'l' appears only once and is the first unique character.
s = "loveleetcode"
2
'v' is the first non-repeating character.
s = "aabb"
-1
s.length ⤠10āµs consists of lowercase English letters onlyExample 1
aabbccdde8Example 2
hyrecruitai0Example 3
mississippi0aabbccdde
8