First Unique Character in a String
Given a string s, return the index of the first character that appears exactly once. If there is no such character, return -1. Two passes: count all characters, then find the first with a count of 1.
firstUniqChar("leetcode"); // 0 ('l')
firstUniqChar("loveleetcode"); // 2 ('v')
firstUniqChar("aabb"); // -1