睡眠排序法-一個不許確的排序方法

今天看到一個很是玄奇的排序方法,大體上相似於桶排序,可是不是特別可靠,就是睡眠排序法,額,python 簡單的代碼以下:算法 from time import sleep items = [2, 4, 10, 2, 1, 7] # 睡眠排序算法 def sleep_sort(i): sleep(i * 0.01) print(i) import threading [th
相關文章
相關標籤/搜索