a linear time modified version of the original sleepsort algorithm