题目描述
blablabla
样例
class Solution:
def firstNotRepeatingChar(self, s):
"""
:type s: str
:rtype: str
"""
if not s:
return '#'
memo = {}
res = []
for ch in s:
if ch not in memo:
memo[ch] = 1
res.append(ch)
elif ch in memo:
memo[ch] += 1
for ch in res:
if memo[ch] == 1:
return ch
return '#'