[sort]O(n)复杂度查找中位数
摘要:前言 使用快速排序算法思想,查找数组中的第k大的数。复杂度为 O ( n ) O(n) O(n)。 代码 #include <iostream> #include <vector> #include <algorithm> // find median using namespace std; in
阅读全文
posted @ 2021-02-26 09:32
posted @ 2021-02-26 09:32
posted @ 2021-02-21 23:28