2016年11月7日

冒泡算法-bubble

摘要: 冒泡算法在数据只有几个无序时是最快的算法,但是如果全部无序的话就变成了最慢的算法了,时间复杂度为O(n^2) public class bubbleSort { public static void main(String[] args) { // TODO Auto-generated method stub int aa[]={2,34,45,6545,6... 阅读全文

posted @ 2016-11-07 11:34 猫儿爹 阅读(164) 评论(0) 推荐(0) 编辑

快速排序算法

摘要: public class quickSort { public static void main(String[] args) { // TODO Auto-generated method stub int [] aa ={23,454,64,65,665,453,234,6,65,75,767,76734,43,2343,656,5754,7547... 阅读全文

posted @ 2016-11-07 10:39 猫儿爹 阅读(209) 评论(0) 推荐(0) 编辑

导航