Skip to content

Commit 531dfa5

Browse files
authored
chore: remove redundant index check in solution
1 parent 32129ea commit 531dfa5

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

solution/0300-0399/0354.Russian Doll Envelopes/README_EN.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ class Solution:
7474
d.append(h)
7575
else:
7676
idx = bisect_left(d, h)
77-
if idx == len(d):
78-
idx = 0
7977
d[idx] = h
8078
return len(d)
8179
```

solution/0300-0399/0354.Russian Doll Envelopes/Solution.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@ def maxEnvelopes(self, envelopes: List[List[int]]) -> int:
77
d.append(h)
88
else:
99
idx = bisect_left(d, h)
10-
if idx == len(d):
11-
idx = 0
1210
d[idx] = h
1311
return len(d)

0 commit comments

Comments
 (0)