排序算法 时间复杂度 稳定排序否
直接插入排序 O(n2) 稳定的
冒泡排序 O(n2) 稳定的
希尔排序 O(n2) 非稳定的
快速排序 O(nlogn) 非稳定的
堆排序 O(nlogn) 非稳定的
归并排序 O(nlogn) 稳定的