Given a string s, find the first non-repeating character in it and return its index. If no unique character exists, return -1.
A non-repeating character is one that appears exactly once in the entire string.
s = "leetcode"0s = "loveleetcode"2s = "aabb"-11 <= s.length <= 10^5s consists of only lowercase English lettersRun your code to see results
Use Cmd+Enter to run