LuckyWasTaken / sleep-sort

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implementation of Sleep Sort algorithm. (Integers only)

Short explanation

Every number in the given array is the number of milliseconds after which it will be pushed to the sorted array. Sleep sort uses no comparison operations and always completes within constant time (the biggest number in array milliseconds), hence O(max(input)+n) complexity.

About


Languages

Language:JavaScript 100.0%