Log in
← All problems

First unique character

mediumStrings20 XP

Return the index of the first character in s that appears only once. Return -1 if there is none.

Examples

Examples use JSON: true/false/null are True/False/None in Python.

Run examples checks the examples above. Submit also runs 3 hidden tests.