Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7112ed4

Browse files
committed
Update 0076-minimum-window-substring.py
follows pylint C0200:consider-using-enumeratethis makes the code cleaner and passs the pylint checkSigned-off-by: Chiao Yang <chiao.cs.yang@gmail.com>
1 parent214cbc5 commit7112ed4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎python/0076-minimum-window-substring.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ def minWindow(self, s: str, t: str) -> str:
1010
have,need=0,len(countT)
1111
res,resLen= [-1,-1],float("infinity")
1212
l=0
13-
forrinrange(len(s)):
14-
c=s[r]
13+
forr,cinenumerate(s):
1514
window[c]=1+window.get(c,0)
1615

1716
ifcincountTandwindow[c]==countT[c]:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp