Skip to content

62 unique paths - #32

Open
MA-yo-TA wants to merge 2 commits into
mainfrom
62-Unique-Paths
Open

62 unique paths#32
MA-yo-TA wants to merge 2 commits into
mainfrom
62-Unique-Paths

Conversation

@MA-yo-TA

Copy link
Copy Markdown
Owner

Comment thread 62-Unique-Paths/step1.py
class Solution:
def uniquePaths(self, num_rows: int, num_columns: int) -> int:
grid = [[0] * num_columns for _ in range(num_rows)]
frontier = deque([(0, 0)])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

row と column の 2 重ループで十分だと思いました。

for row in range(num_rows):
    for column in range(num_columns):
        ...

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