HTMLify

LeetCode - First Letter to Appear Twice - Python
Views: 126 | Author: abh
class Solution:
    def repeatedCharacter(self, s: str) -> str:
        seen = set()
        for c in s:
            if c in seen:
                return c
            seen.add(c)

Comments