Skip to content

Commit 5b26e13

Browse files
authored
Update 1002.查找常用字符.md
这个python代码又有小问题,不知道为啥修改前虽然word[0]逻辑上完全讲不通,但是运行居然正确
1 parent c8149ce commit 5b26e13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

problems/1002.查找常用字符.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class Solution:
181181
# 统计除第一个字符串外字符的出现频率
182182
for i in range(1, len(words)):
183183
hashOtherStr = [0] * 26
184-
for j in range(len(words[0])):
184+
for j in range(len(words[i])):
185185
hashOtherStr[ord(words[i][j]) - ord('a')] += 1
186186
# 更新hash,保证hash里统计26个字符在所有字符串里出现的最小次数
187187
for k in range(26):

0 commit comments

Comments
 (0)