Skip to content

542. 01 Matrix#27

Open
ryosuketc wants to merge 5 commits into
mainfrom
542_01_matrix
Open

542. 01 Matrix#27
ryosuketc wants to merge 5 commits into
mainfrom
542_01_matrix

Conversation

@ryosuketc
Copy link
Copy Markdown
Owner

Comment thread 542_01_matrix/step2.cpp
int rows = mat.size();
// if (rows == 0) return mat;
int cols = mat[0].size();
// Use a safe "infinity" that won't overflow when adding 1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

全体的に読みやすく勉強になりました。
最代入しない変数のであれば、const を付けても良いと思いました。

const int rows = mat.size();
const int cols = mat[0].size();

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