Step 10 of 12 · Frequency maps
First unique character
Problem
Read one lowercase word and return its first character that appears exactly once. Return "None" when every character repeats.
Input
One lowercase word with no spaces.
Output
The first non-repeating character, or the exact word "None".
Examples
swiss
w
s repeats, while w is the first character seen exactly once.
aabb
None
Every character appears more than once.