摘要: 1、插入排序插入是比较简单的一种排序方法,基本思想就是把数据分组两段,一部分是有序,另一部分是待排序的。把有序的数据不断的加大到全数组完成排序。代码完成如下:class insert { public void insert_sort(int[] arrays){ for(int i=0;i<arrays.length;i++){ for(int j=i;j>0;j--){ if(j==0) continue; if(arrays[j]>arrays[j-... 阅读全文
posted @ 2012-09-10 16:36 春天的故事 阅读(490) 评论(0) 推荐(1) 编辑