First Non-Repeating Character

PHP Medium 4 views
Back to Questions

Problem Description

Print the first character that appears only once. If none, print -1.

Input Format

One line string s.

Output Format

One character or -1.

Sample Test Case

Input:
aabbcddee
Output:
c

Constraints

|s|

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next