EasyRating 1000
First Unique Character
Print the index of the first character that appears exactly once, or -1.
Input
One word.
Output
An index.
Sample 1
Input
leetcode
Output
0
Sample 2
Input
loveleetcode
Output
2
Output appears hereOne word.
An index.
leetcode
0
loveleetcode
2
Output appears here