Skip to content

63. Unique Paths II#32

Open
hemispherium wants to merge 4 commits into
mainfrom
0063-unique-paths-II
Open

63. Unique Paths II#32
hemispherium wants to merge 4 commits into
mainfrom
0063-unique-paths-II

Conversation

@hemispherium
Copy link
Copy Markdown
Owner

@hemispherium hemispherium self-assigned this Apr 23, 2026
if (row == 1 && column == 1 && obstacleGrid[row - 1][column - 1]) {
return 0;
}
vector<vector<int>> ways(row, vector<int>(column));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらの問題も Unique Paths I と同様に、空間計算量を O(column) にすることができます。興味があれば調べることをお勧めいたします。

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます!alternative-solution.cppで追加してみました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants