First Unique Character In A String

easy
1. You will be given a String s 2. You need to return the index of first unique character of this string 3. Input is handled for you 4. Output is handled for you 5. It is a functional problem ,please do not modify main()

Input Format

Input is handled for you

Output Format

Return the index of first unique character of this string Output is handled for you

Constraints

Assume the given string has characters only in lowercase

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
pepcoding
Output
1
Previous
First Repeating Element
Next
Frequency Of Limited Range Array Elements

Related Questions