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

Commit 9969c49

Browse files
committed
feat: update lc problems
1 parent e1db205 commit 9969c49

File tree

8 files changed

+9
-11
lines changed

8 files changed

+9
-11
lines changed

‎solution/0200-0299/0220.Contains Duplicate III/Solution.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33

44
class Solution:
5-
def containsNearbyAlmostDuplicate(self, nums: List[int], indexDiff: int, valueDiff: int) -> bool:
5+
def containsNearbyAlmostDuplicate(
6+
self, nums: List[int], indexDiff: int, valueDiff: int
7+
) -> bool:
68
s = SortedSet()
79
for i, v in enumerate(nums):
810
j = s.bisect_left(v - valueDiff)

‎solution/0300-0399/0336.Palindrome Pairs/README.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
<strong>输出:</strong>[[0,1],[1,0]]
3333
</pre>
3434

35-
36-
3735
<p><strong>提示:</strong></p>
3836

3937
<ul>

‎solution/0500-0599/0554.Brick Wall/README.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
<strong>输出:</strong>3
2929
</pre>
3030

31-
32-
3331
<p><strong>提示:</strong></p>
3432

3533
<ul>

‎solution/0800-0899/0830.Positions of Large Groups/README.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
<strong>输出:</strong>[]
4949
</pre>
5050

51-
52-
5351
<p><strong>提示:</strong></p>
5452

5553
<ul>

‎solution/0900-0999/0913.Cat and Mouse/Solutioin.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def get_prev_states(state):
4343
pm, pc, pt = prev_state
4444
if res[pm][pc][pt] == TIE:
4545
win = (t == MOUSE_WIN and pt == MOUSE_TURN) or (
46-
t == CAT_WIN and pt == CAT_TURN)
46+
t == CAT_WIN and pt == CAT_TURN
47+
)
4748
if win:
4849
res[pm][pc][pt] = t
4950
q.append(prev_state)

‎solution/1700-1799/1730.Shortest Path to Get Food/Solution.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
class Solution:
22
def getFood(self, grid: List[List[str]]) -> int:
33
m, n = len(grid), len(grid[0])
4-
i, j = next((i, j) for i in range(m)
5-
for j in range(n) if grid[i][j] == '*')
4+
i, j = next((i, j) for i in range(m) for j in range(n) if grid[i][j] == '*')
65
q = deque([(i, j)])
76
dirs = (-1, 0, 1, 0, -1)
87
ans = 0

‎solution/2400-2499/2476.Closest Nodes Queries in a Binary Search Tree/Solution.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
# self.left = left
66
# self.right = right
77
class Solution:
8-
def closestNodes(self, root: Optional[TreeNode], queries: List[int]) -> List[List[int]]:
8+
def closestNodes(
9+
self, root: Optional[TreeNode], queries: List[int]
10+
) -> List[List[int]]:
911
def dfs(root):
1012
if root is None:
1113
return
2.1 KB
Loading[フレーム]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /