-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Algorithm DSU #19
base: main
Are you sure you want to change the base?
Algorithm DSU #19
Conversation
…unction are written with a capital letter, and part of algorithm Johnson are ready
clang-tidy review says "All clean, LGTM! 👍" |
0863ef6
to
903bc92
Compare
903bc92
to
418874f
Compare
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
additional_tasks/DSU/src/test.cpp
Outdated
int edge = 3; | ||
vector<vector<int>> edges = {{1, 2, 4}, {2, 3, 5}, {1, 3, 3}}; | ||
|
||
int result = main_part(vertices, edge, edges); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'result' of type 'int' can be declared 'const' [misc-const-correctness]
int result = main_part(vertices, edge, edges); | |
int const result = main_part(vertices, edge, edges); |
vector<vector<int>> edges = {{1, 2, 4}, {2, 3, 5}, {1, 3, 3}}; | ||
|
||
int result = main_part(vertices, edge, edges); | ||
int expected = 7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'expected' of type 'int' can be declared 'const' [misc-const-correctness]
int expected = 7; | |
int const expected = 7; |
additional_tasks/DSU/src/test.cpp
Outdated
vector<vector<int>> edges = { | ||
{1, 2, 1}, {2, 3, 1}, {3, 4, 1}, {1, 4, 1}, {2, 4, 1}}; | ||
|
||
int result = main_part(vertices, edge, edges); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'result' of type 'int' can be declared 'const' [misc-const-correctness]
int result = main_part(vertices, edge, edges); | |
int const result = main_part(vertices, edge, edges); |
additional_tasks/DSU/src/test.cpp
Outdated
{1, 2, 1}, {2, 3, 1}, {3, 4, 1}, {1, 4, 1}, {2, 4, 1}}; | ||
|
||
int result = main_part(vertices, edge, edges); | ||
int expected = 3; // MST can include edges with weight 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'expected' of type 'int' can be declared 'const' [misc-const-correctness]
int expected = 3; // MST can include edges with weight 1 | |
int const expected = 3; // MST can include edges with weight 1 |
additional_tasks/DSU/src/test.cpp
Outdated
vector<vector<int>> edges = {{1, 2, 4}, {1, 3, 1}, {2, 3, 2}, {2, 4, 5}, | ||
{3, 4, 8}, {4, 5, 3}, {5, 6, 7}, {4, 6, 6}}; | ||
|
||
int result = main_part(vertices, edge, edges); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'result' of type 'int' can be declared 'const' [misc-const-correctness]
int result = main_part(vertices, edge, edges); | |
int const result = main_part(vertices, edge, edges); |
additional_tasks/DSU/src/test.cpp
Outdated
{3, 4, 8}, {4, 5, 3}, {5, 6, 7}, {4, 6, 6}}; | ||
|
||
int result = main_part(vertices, edge, edges); | ||
int expected = 17; // Minimum spanning tree weight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'expected' of type 'int' can be declared 'const' [misc-const-correctness]
int expected = 17; // Minimum spanning tree weight | |
int const expected = 17; // Minimum spanning tree weight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
vector<vector<int>> edges = {{1, 2, 4}, {2, 3, 5}, {1, 3, 3}}; | ||
|
||
int const result = main_part(vertices, edge, edges); | ||
int expected = 7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'expected' of type 'int' can be declared 'const' [misc-const-correctness]
int expected = 7; | |
int const expected = 7; |
No description provided.