0.2 Non Repeating Character
(RankList for this Question)
Score: 10pts
Time Limit: 2.00 sec
Write a function that takes in a string in lower case characters and returns the index of the strings first non-repeating character
The first non-repeating character is the first character that appears in the string only once
If the string does not have any non-repeating character print -1

All the characters are lowercase
Length of string can be at most 100

Input Format
String S

Output Format
Index of nonrepeating character

Example 1


b is the first non-repeating character

Log In to solve the Question