x/masx200_leetcode_test/di-yi-ge-zhi-chu-xian-yi-ci-de-zi-fu-lcof/index.ts
123456789101112export default function firstUniqChar(s: string): string { const seen = new Map<string, number>(); for (const c of s) { seen.set(c, 1 + (seen.get(c) ?? 0)); } for (const [char, count] of seen) { if (count === 1) return char; } return " ";}