sleep sort

by loucheman
See Code Download Embed
In general, sleep sort works by starting a separate task for each item to be sorted, where each task sleeps for an interval corresponding to the item's sort key, then emits the item. Items are then collected sequentially in time.

Only positive integers

Created November 7, 2022

Last updated January 31, 2024

Published November 7, 2022