pratik-choudhari / AlgoCode

Welcome everyone!🌟 Here you can solve problems, build scrappers and much more💻
https://github.com/pratik-choudhari/AlgoCode
MIT License
131 stars 166 forks source link

Sleep Sort Algorithm #476

Closed dhairya-parikh closed 3 years ago

dhairya-parikh commented 3 years ago

Feature ✅

Description

Sort an array of given non-negative integers using Sleep Sort Algorithm. In this algorithm, we create different threads for each of the elements in the input array and then each thread sleeps for an amount of time which is proportional to the value of the corresponding array element.

Example

INPUT: 8 2 9 OUTPUT: 2 8 9

Checklist:

Contributors are supposed to mention their coding language while asking for assignment