Hash Strategies Target: 10s
Two-pass frequency count: first pass counts, second pass finds the target. Works for first unique, most common, etc.
freq = {}
for c in s:
freq[c] = freq.get(c, 0) + 1
for i, c in enumerate(s):
if freq[c] == 1:
return i
Type it from memory. Go.