LeetCodeFirst Letter to Appear TwiceFirst Letter to Appear TwiceEasyHash TableStringBit ManipulationCountingSolution export function repeatedCharacter(s: string): string { const set = new Set(); for (const char of s) { if (set.has(char)) { return char; } set.add(char); } return ''; }LeetCodeFirst Letter to Appear Twicehttps://leetcode.com/problems/first-letter-to-appear-twice