![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
排序
写有意思的代码
这个作者很懒,什么都没留下…
展开
-
希尔排序C++代码示例
#include<exception>#include<iostream>#include<functional>#include<utility>using namespace std;using uint = unsigned int;template<typename T>void shellSort(T *data, uint len, function<bool(T,T)> cmp) { //检查参.原创 2020-08-21 17:10:30 · 303 阅读 · 0 评论 -
冒泡排序C++示例代码
#include<functional>#include<utility>#include<exception>#include<iostream>using namespace std;using uint = unsigned int;template<typename T>void bubble_sort(T arr[], const uint len, function<bool(T,T)> cmp){ .原创 2020-08-21 20:51:26 · 473 阅读 · 0 评论