#K58872. First Non-Repeating Character
First Non-Repeating Character
First Non-Repeating Character
Given a string s
, your task is to find the first character that does not repeat anywhere in the string. If every character in the string repeats, output an empty string.
Note: The input will be provided via standard input and the output must be printed to standard output. Use efficient algorithms to solve the problem.
The solution should consider all characters and preserve their order of appearance to determine which is the first non-repeating character.
inputFormat
The input consists of a single line containing the string s
.
outputFormat
Output the first non-repeating character from the string. If there is no such character, output an empty string.## sample
swiss
w