Skip to content

62. Unique Paths - #31

Open
miyataka wants to merge 1 commit into
mainfrom
62_UniquePaths
Open

62. Unique Paths#31
miyataka wants to merge 1 commit into
mainfrom
62_UniquePaths

Conversation

@miyataka

Copy link
Copy Markdown
Owner

// 時間計算量としてはO(MN), 10^4 / 10^8 なので,10^-4 = 0.1ms程度.
// 空間計算量としては,10^4 * 8B = 80KB程度
func uniquePaths(m int, n int) int {
boards := make([][]int, m)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

board という単語は、題材中に登場していないようです。題材中に登場する英単語や英語句を付けたほうが、読み手にとって内容を想起しやすくなると思います。 the number of possible unique paths を表す num_paths はいかがでしょうか?

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.

これはそのとおりですね.

goの流儀としてcamelCaseにするとして,numPathsかなと思いました.3回目は類似のpathCountsにしましたが,num というprefixがより広範囲の人々に伝わりやすいかもしれないですね.

コメントありがとうございます

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