Skip to content

Commit 2fe1729

Browse files
update post
1 parent c7252c2 commit 2fe1729

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

_posts/2024-02-18-leetcode-3.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ class Solution:
3737
return length
3838

3939
for i, char in enumerate(characters):
40-
length = findLongestSubstring(i)
41-
if length > longest:
42-
longest = length
40+
longest = max(longest, findLongestSubstring(i))
4341

4442
return longest
4543
```

0 commit comments

Comments
 (0)