Go back to Challenges list
The Pair of Characters
There are N characters in an array A. All the characters occur only once except one that ocurs twice. Your task is to find out that character that occurs twice. All characters will be lowercase.
Input Format
A string that contains N characters each separated by a single space.Output Format
The output expected is the character that occurs twice.Sample Inputs
a b c d d e f
b b
a j h d f s e r sSample Outputs
d
b
s
Memory Limit
512M