题目
代码
执行用时:60 ms, 在所有 Python3 提交中击败了96.72% 的用户
内存消耗:15 MB, 在所有 Python3 提交中击败了82.50% 的用户
通过测试用例:104 / 104
class Solution:
def firstUniqChar(self, s: str) -> str:
cnt=Counter(s)
for item in cnt:
if cnt[item]==1:
return item
return ' '