摘要: 排序算法的分类有多种分法. 是否是基于比较的; 是否是稳定排序; 当然也可按照时间复杂度和空间复杂度来进行划分. 而本文关注的重点在于时间复杂度及基于比较的排序. 基排序和计数排序等在此就不进行讨论了.头文件 sort.h 1 #include <iostream> 2 3 class sort 4 { 5 public: 6 static bool bubble_sort(int* arry, int n);//冒泡排序 7 static bool insert_sort_no(int* arry, int n);//插入排序,非递归 8 static bool i... 阅读全文
posted @ 2012-08-04 19:31 樹下 阅读(260) 评论(0) 推荐(0) 编辑