deno.land / x / masx200_leetcode_test@10.6.5 / di-yi-ge-zhi-chu-xian-yi-ci-de-zi-fu-lcof / index.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
export 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 " ";}
masx200_leetcode_test
leetcode题解和一些测试工具
DocumentationDocumentation
GitHub Repositorymasx200/leetcode-test
GitHub Stars
4

Version Info

Tagged at
4 months ago