OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cc6851
)
fix bug #133
author
CJSoft
<egwcyh@qq.com>
Sun, 19 Aug 2018 17:28:24 +0000
(
01:28
+0800)
committer
CJSoft
<egwcyh@qq.com>
Sun, 19 Aug 2018 17:28:24 +0000
(
01:28
+0800)
docs/basic/sort.md
patch
|
blob
|
history
diff --git
a/docs/basic/sort.md
b/docs/basic/sort.md
index
b370cca
..
36956b7
100644
(file)
--- a/
docs/basic/sort.md
+++ b/
docs/basic/sort.md
@@
-22,9
+22,9
@@
## 快速排序
-C
++ 函数模板库实现了快速排序,可以查阅 [std::sort()](https://devdocs.io/cpp/algorithm/sort
)
+C
函数模板库实现了快速排序,即`stdlib.h`当中的`qsort`。但在OI相关比赛当中,更为常见的库排序函数是C++ `algorithm`库中的`std::sort`函数。C++标准并未严格要求此函数的实现算法,具体实现取决于编译器,但他的时间复杂度是$O(N\log N)$的。可以查阅 [std::sort()](http://www.cplusplus.com/reference/list/list/sort/
)
-用法:
+
快速
用法:
```c++
// a[0] .. a[n - 1] 是放了元素的
std::sort(a, a + n);