The Wayback Machine - https://web.archive.org/web/20201103191621/https://github.com/TheAlgorithms/Java/issues/1750
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

Sleep sort algo #1750

Open
sreechand2002 opened this issue Oct 12, 2020 · 3 comments
Open

Sleep sort algo #1750

sreechand2002 opened this issue Oct 12, 2020 · 3 comments

Comments

@sreechand2002
Copy link

@sreechand2002 sreechand2002 commented Oct 12, 2020

sleep sorting makes use of threads to sort the element

@rbshealy
Copy link
Contributor

@rbshealy rbshealy commented Oct 12, 2020

What are the benefits and drawbacks of this algorithm? How is it implemented?

@sreechand2002
Copy link
Author

@sreechand2002 sreechand2002 commented Oct 13, 2020

The benefits of this algo is that all the sorting is done by threads hence no auxiliary space is required , it more oriented towards OS unlike other algos, the drawback is that , it doesnt work efficiently when difference between the numbers is small(ex 1,2,3,4)
It is implemented using threads , for each value of array a thread is created and made to sleep for so much of time and which ever thread wakes up first , it prints the value for the time it slept which the values of an element in the array

@dhairya-parikh
Copy link

@dhairya-parikh dhairya-parikh commented Oct 24, 2020

Can you please assign this to me?
@sreechand2002

@dhairya-parikh dhairya-parikh mentioned this issue Oct 26, 2020
10 of 12 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.