Skip to content

Conversation

@2Clutch
Copy link
Contributor

@2Clutch 2Clutch commented Jan 18, 2025

I Am Adding a New Code Snippet in an Existing Language

2Clutch and others added 30 commits October 26, 2024 18:29
…Add checks for empty inputs, matching cardinality, and valid integers + Adjust output format to ensure correct line breaks for points
…t input validation for cases: no input, missing y, invalid shape, different cardinality, and invalid integers + Developed the Gift Wrapping algorithm to compute the convex hull + Ensure output format matches requirements for unit testing
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@rzuckerm rzuckerm added enhancement Any code that improves the repo depth first search See: https://sampleprograms.io/projects/depth-first-search/ labels Jan 18, 2025
Copy link
Collaborator

@rzuckerm rzuckerm left a comment

Choose a reason for hiding this comment

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

I think you're going to have to add -lm to the build line in testinfo.yml in order to pull in the math libraries.

@2Clutch
Copy link
Contributor Author

2Clutch commented Jan 18, 2025

I think you're going to have to add -lm to the build line in testinfo.yml in order to pull in the math libraries.

Will keep this in mind moving forward. I ended up doing without it altogether.

@2Clutch 2Clutch requested a review from rzuckerm January 18, 2025 23:17
@rzuckerm
Copy link
Collaborator

rzuckerm commented Jan 18, 2025

Recommended workflow:

  • Keep your main branch clean by only using it to resync to the main branch of this repository
  • Create a different branch for each sample program based on your main branch. For example, I would call the branch for this sample something like c-depth-first-search
  • Keep pull requests in draft mode until they pass all the tests. That way I know when you're actually ready for me or Jeremy to review it

@2Clutch
Copy link
Contributor Author

2Clutch commented Jan 18, 2025

Recommended workflow:

  • Keep your main branch clean by only using it to resync to the main branch of this repository
  • Create a different branch for each sample program based on your main branch. For example, I would call the branch for this sample something like c-depth-first-search
  • Keep pull requests in draft mode until they pass all the tests. That way I know when you're actually ready for me or Jeremy to review it

Noted. I don't think I've added or removed anything from draft (honestly didn't realize this was a feature). I just open a PR from the web and wait for review.

I've always waited for a PR to be approved before submitting the next one. Afaik, I don't have multiple PRs open, although #3299 is still open even though the relevant PR has been merged.

Comment on lines 79 to 82
num_nodes = 0;
while (num_nodes * num_nodes < total_elements) {
num_nodes++;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please see my previous comment about how to fix sqrt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ended up implementing a solution without sqrt that successfully passes all the checks so I don't think an update is needed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be a good idea to update the testinfo.yml so that other samples can use sqrt and other math functions from math.h.

@rzuckerm
Copy link
Collaborator

rzuckerm commented Jan 18, 2025

Afaik, I don't have multiple PRs open, although #3299 is still open even though the relevant PR has been merged.

The "I fixed" field has two # characters. That's why it didn't auto-close. I just closed #3299

Copy link
Collaborator

@rzuckerm rzuckerm left a comment

Choose a reason for hiding this comment

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

Thanks for you contribution, and sorry for all the difficulty @2Clutch

@rzuckerm rzuckerm merged commit b3649cb into TheRenegadeCoder:main Jan 19, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depth first search See: https://sampleprograms.io/projects/depth-first-search/ enhancement Any code that improves the repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Depth First Search in C

2 participants