Skip to content

Conversation

@2Clutch
Copy link
Contributor

@2Clutch 2Clutch commented Jan 19, 2025

I Am Adding a New Code Snippet in an Existing Language

@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.

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.

Sorry, but this isn't how Sleep Sort works. It involves spinning up threads that sleep for the requested amount of time and put the value into a queue that can be output later. Please see the project requirements

@2Clutch
Copy link
Contributor Author

2Clutch commented Jan 19, 2025

Sorry, but this isn't how Sleep Sort works. It involves spinning up threads that sleep for the requested amount of time and put the value into a queue that can be output later. Please see the project requirements

the thread solution causes issue with the checks even after adding -pthread to the build command, and I'm not sure I can update those. i honestly wouldn't want to do it tbh.

edit 1: nvm. looks like it worked fine with threading. not sure what i was doing wrong before

@2Clutch 2Clutch requested a review from rzuckerm January 19, 2025 20:23
@rzuckerm rzuckerm added enhancement Any code that improves the repo sleep sort See: https://sampleprograms.io/projects/sleep-sort/ labels Jan 19, 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.

Thanks for contributing one of the more difficult samples, @2Clutch ! You're well on your way to completing all the C samples.

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

Labels

enhancement Any code that improves the repo sleep sort See: https://sampleprograms.io/projects/sleep-sort/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Sleep Sort in C

2 participants