+1 vote
in Python by

Given a string, return the first recurring character in it, or “None” if there is no recurring character.

1 Answer

0 votes
by

Example:

input = "interviewquery"

output = "i"

Given that we have to return the first index of the second repeating character, we should be able to go through the string in one loop, save each unique character, and then just check if the character exists in that saved set. If it does, return the character.

Related questions

+1 vote
asked Jan 10, 2021 in Python by rajeshsharma
0 votes
asked Feb 11, 2021 in Python by SakshiSharma
...