← Questions

First unique character in a string

0
AmazonCodingLast asked Jul 2025

Return the index of the first character in a string that appears only once, or -1 if every character repeats. Do it in two passes with a count table.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding