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 611336a

Browse files
Merge pull request youngyangyang04#2424 from stevenleon99/patch-1
Update 0059.螺旋矩阵II.md
2 parents bfc4896 + e7e7c46 commit 611336a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎problems/0059.螺旋矩阵II.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ public:
8787

8888
// 下面开始的四个for就是模拟转了一圈
8989
// 模拟填充上行从左到右(左闭右开)
90-
for (j = starty; j < n - offset; j++) {
91-
res[startx][j] = count++;
90+
for (j; j < n - offset; j++) {
91+
res[i][j] = count++;
9292
}
9393
// 模拟填充右列从上到下(左闭右开)
94-
for (i = startx; i < n - offset; i++) {
94+
for (i; i < n - offset; i++) {
9595
res[i][j] = count++;
9696
}
9797
// 模拟填充下行从右到左(左闭右开)

0 commit comments

Comments
(0)

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