100-days-of-rust/Week-10/Day-64_First-Recurring-Character
2023-03-23 21:38:35 -04:00
..
README.md Add files via upload 2023-03-23 21:38:35 -04:00

First Recurring Character

Write a program that outputs the first recurring character in a string.

Input Description

A string of alphabetical characters. Example:

ABCDEBC

Output Description

The first recurring character from the input. From the above example:

B

Note

What is exactly the definition of 'first recurring character'?

  • It is the character that recurs first (B in the series ABBA)

Examples

ABCDEBC ➞ B
ABBA ➞ B