First Unique Character
Medium · rating 1250 · Hashing, Strings
Read a string of lowercase letters. Print the 0-based index of the first character that appears exactly once, or -1 if there is none.
Constraints: 1 ≤ length ≤ 105
Related problems
- Election Winner — Medium
- Most Common Word — Medium
- Keypad Taps — Medium
- Count Anagram Groups — Medium
- Sort by Frequency — Medium
- Longest Substring Without Repeats — Medium