First Unique Character in a String
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.
Examples:
分析
dict 存 i: count, 第二次loop遇到count==1直接返回Index
python 法 注意 min([] or[-1])
Last updated
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.
Examples:
分析
dict 存 i: count, 第二次loop遇到count==1直接返回Index
python 法 注意 min([] or[-1])
Last updated