feat: Project Euler Problem #107#653
Conversation
| * The union find data structure | ||
| */ | ||
| struct ufds { | ||
| int rank[NUM_VERTICES], parent[NUM_VERTICES], size[NUM_VERTICES]; |
There was a problem hiding this comment.
| int rank[NUM_VERTICES], parent[NUM_VERTICES], size[NUM_VERTICES]; | |
| int rank[NUM_VERTICES]; /**< 1-line description of variable here */ | |
| int parent[NUM_VERTICES];/**< 1-line description of variable here */ | |
| int size[NUM_VERTICES];/**< 1-line description of variable here */ |
| */ | ||
| struct ufds { | ||
| int rank[NUM_VERTICES], parent[NUM_VERTICES], size[NUM_VERTICES]; | ||
| int num_sets; |
There was a problem hiding this comment.
| int num_sets; | |
| int num_sets; /**< 1-line description of variable here */ |
| #include <stdlib.h> | ||
| #include <string.h> | ||
| #include <assert.h> | ||
|
|
There was a problem hiding this comment.
| /** | |
| * @addtogroup project_euler_107 Project Euler 107 | |
| * @{ | |
| */ |
Since there are many associated functions and variables involved, better to group them for easy navigation on documentation site
| } | ||
| } | ||
|
|
||
| /* Compare two edges by their weight */ |
There was a problem hiding this comment.
| /* Compare two edges by their weight */ | |
| /** Compare two edges by their weight | |
| * @param a pointer to ... | |
| * @param b pointer to ...... | |
| * @returns ..... | |
| */ |
| } | ||
| } | ||
|
|
||
| /* |
| int w; | ||
| }; | ||
|
|
||
| /* |
| #define NUM_LINES 40 | ||
| #define MAX_LINE_LEN 4 * 40 // a line is at most 40 3-digit numbers and a comma | ||
|
|
||
| /* |
| * get the savings and the solution to the problem. | ||
| */ | ||
|
|
||
| /** Main function */ |
There was a problem hiding this comment.
| /** Main function */ | |
| /** Main function | |
| * @return 0 | |
| */ |
|
Thanks @kvedala, done. |
|
Could I also ask to have the hacktoberfest tag added? I just realized I forgot to include it with my inital PR and can't seem to add it now, my bad. |
This repository has the |
|
Sweet, thanks! |
Most of the comments have not been addressed. Please review them |
Add syntax correction. Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
|
My bad, |
No worries. I am marking this PR as "draft" and make your changes. Once the code is ready for review, you can then mark it as such. |
|
This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions! |
Description of Change
Add a solution to project euler problem 107 using Kruskal's algorithm.
I've followed the contribution guidelines to the best of my abilities, please lmk of any changes you would like to be made.
Thank you for your time!
References
Checklist
Notes: