Skip to content

Commit 6290bb7

Browse files
Changes
1 parent 575e04c commit 6290bb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: python/0079-word-search.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def dfs(r, c, i):
2525
return res
2626

2727
# To prevent TLE,reverse the word if frequency of the first letter is more than the last letter's
28-
count = defaultdict(int, sum(map(Counter, board), Counter()))
28+
count = sum(map(Counter, board), Counter())
2929
if count[word[0]] > count[word[-1]]:
3030
word = word[::-1]
3131

0 commit comments

Comments
 (0)