Skip to content

Commit f57e210

Browse files
committed
2020-02-02
1 parent 724de88 commit f57e210

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Solution(object):
2+
def firstUniqChar(self, s):
3+
"""
4+
:type s: str
5+
:rtype: int
6+
"""
7+
dic = collections.Counter(s)
8+
9+
for i, ch in enumerate(s):
10+
if dic[ch] == 1:
11+
return i
12+
return -1

0 commit comments

Comments
 (0)