# 2351. First Letter to Appear Twice

## Solution 1 (time O(n), space O(n))

```python
class Solution(object):
    def repeatedCharacter(self, s):
        """
        :type s: str
        :rtype: str
        """
        char_set = set([])
        for c in s:
            if c in char_set:
                return c
            else:
                char_set.add(c)
```