First Non-repeating Character
easy
1. You are given a string. 2. You have to find the index of the first non-repeating character in the given string. 3. If no such character exists, print "-1".
Constraints
1 <= length of the string <= 10^5
Format
Input
A string
Output
A number representing the index of the first non-repeating character.
Example
Sample Input
pepcoding
Sample Output
1