Skip to content
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

fix: main function bugs #2709

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

EdwinIZ8
Copy link

@EdwinIZ8 EdwinIZ8 commented Aug 17, 2024

Description of Change

Fixed a grammar error and solved a naming error.

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

4, 8, INFINITY, 0, 5, 7,
INFINITY, 3, 1, 5, 0, INFINITY,
INFINITY, INFINITY, INFINITY, 7, INFINITY, 0};
constexpr int POSITIVE_INFINITY = 99999;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not use numeric_limits<int>::infinty(); from the cmath library?

Copy link
Author

Choose a reason for hiding this comment

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

numeric_limits::infinty() returns 0

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah I forgot infinity only works for floats. What about numeric_limit::max()?

Comment on lines +58 to +65
constexpr int POSITIVE_INFINITY = 99999;
std::array<std::array<int, 6>, 6> graph = {
0, 4, 1, 4, POSITIVE_INFINITY, POSITIVE_INFINITY,
4, 0, 3, 8, 3, POSITIVE_INFINITY,
1, 3, 0, POSITIVE_INFINITY, 1, POSITIVE_INFINITY,
4, 8, POSITIVE_INFINITY, 0, 5, 7,
POSITIVE_INFINITY, 3, 1, 5, 0, POSITIVE_INFINITY,
POSITIVE_INFINITY, POSITIVE_INFINITY, POSITIVE_INFINITY, 7, POSITIVE_INFINITY, 0};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also this should be moved to a test function outside main

@realstealthninja realstealthninja added awaiting modification Do not merge until modifications are made Improvement improvement in previously written codes labels Aug 31, 2024
Copy link
Contributor

github-actions bot commented Oct 1, 2024

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.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting modification Do not merge until modifications are made Improvement improvement in previously written codes stale Author has not responded to the comments for over 2 weeks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants