---
title: "哪些事情让你觉得「哇！还可以这么干」？"
slug: "20130511-zhihu-answer-17000892"
url: "https://ranchen.org/content/20130511-zhihu-answer-17000892"
markdown_url: "https://ranchen.org/content/20130511-zhihu-answer-17000892.md"
createdAt: "2013-05-11T06:03:52-07:00"
updatedAt: "2016-12-21T11:22:53-08:00"
authors: ["陈然"]
source: "zhihu"
sourceType: "answer"
topics: ["programming"]
tags: []
readingTime: "1 分钟"
sources:
  - platform: "zhihu"
    type: "answer"
    url: "https://www.zhihu.com/question/20757251/answer/17000892"
---

# 哪些事情让你觉得「哇！还可以这么干」？

想起了两个神级的排序算法

1. Sleep Sort

输入一组数 A1 A2 ... An, 新建n个线程，每个线程Sleep(Ai)，然后输出Ai，就排序好了。。

这可是正儿八经的多线程排序噢！！！

详情：

[排序算法 Sleep Sort](https://link.zhihu.com/?target=http%3A//coolshell.cn/articles/4883.html)
2. Bogosort

输入一组数，随机打散顺序，如果不是有序的，继续随机打散顺序。

目测这是时间复杂度最高的排序之一的，如果这个真的能算排序算法的话。。

平均时间复杂度O(n*n!)

详情：

[Bogosort](https://link.zhihu.com/?target=http%3A//en.wikipedia.org/wiki/Bogosort)
