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:
[x] I have read the project guidelines.
[x] I have checked all the existing projects, before submitting a new project issue.
[x] This issue will be meaningful for the project.
[x] I will contribute more in future
Contributors are supposed to mention their coding language while asking for assignment
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