Find First Non-Repeating Character

Given a string, find and return the first non-repeating character. The string contains only lowercase alphabets. If there is no non-repeating character, return 'nil'. For example, input 'leetcode' s...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: