 All Problems
First Unique Character in a String
easy
strings
hash map
queue
amazon
google
microsoft
facebook

Given a string s, return the index of the first non-repeating character. Return -1 if none.

Example 1:

Input:  leetcode
Output: 0

Example 2:

Input:  aabb
Output: -1

Input format: A single string of lowercase letters.

Run to check your code against the sample cases, or submit to run every case