Unstub

CountingEasy

First Unique Character in a String

s is lower-case letters. Return the index of the first letter that is in s only once, or -1 if every letter repeats.

Aim for O(n) time, O(1) space (26 letters)Inspired by a classic interview problem ↗