java实现package sort;public class SwapSort { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated m...
分类:
其他好文 时间:
2014-10-02 18:15:13
阅读次数:
137
package sort;public class CheapSort { public static final int MAX=10; public static void main(String[] args){ int []a={0,16,7,3,2...
分类:
其他好文 时间:
2014-10-02 17:25:33
阅读次数:
181
java实现package sort;public class SelectSort { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated...
分类:
其他好文 时间:
2014-10-02 17:02:03
阅读次数:
196
java实现:package sort;public class InsertSort { public static void main(String[] args) { int[] arr={70,80,31,37,10,1,48,60,33,80};...
分类:
其他好文 时间:
2014-10-02 15:54:13
阅读次数:
183
冒泡 package com.bjsxt.sort.bubble; import java.util.Arrays; public class BubbleSort1 { /** * @param args */ public static void main(String[] args) { in...
分类:
其他好文 时间:
2014-10-01 20:54:42
阅读次数:
254
brief : the quick sort can divide into two steps, the first step is partition, the second step is conquer the subset.i) as the first step, array A[lef...
分类:
其他好文 时间:
2014-10-01 01:21:50
阅读次数:
209
在要排序的一组数列中,选出最小(或者最大)的一个数与第1个位置的数交换;然后在剩下的数当中再找最小(或者最大)的与第2个位置的数交换,依次类推,直到第n-1个元素(倒数第二个数)和第n个元素(最后一个数)比较为止。function sort(elements){ for(i = 0; i < el....
分类:
编程语言 时间:
2014-09-30 23:17:30
阅读次数:
220
本文介绍的STL算法中的sort排序算法,SGI STL中的排序算法不是简单的快速排序,而是交叉利用各种排序:堆排序、插入排序和快速排序;这样做的目的是提高效率,针对数据量比较大的采用快速排序,数据量比较小的可以采用堆排序或插入排序。...
分类:
其他好文 时间:
2014-09-30 20:56:30
阅读次数:
312
思路是把字典转为列表后再排序d={'z':1,'y':2,'x':3} # 字典s=d.items() # [('y', 2), ('x', 3), ('z', 1)] 列表s.sort() # [('x', 3), ('y', 2), ('z', 1)] 排序列表# 或者连起来写(sort是...
分类:
编程语言 时间:
2014-09-30 14:54:59
阅读次数:
208
第一次写这么长的程序,代码仅供參考,有问题请留言。/*** 学生信息管理系统** IDE:Dev-Cpp 4.9.9.2** 2014-6-15*/#include #include #include #include #include using std::sort;using std::vect...
分类:
编程语言 时间:
2014-09-30 14:19:59
阅读次数:
279