薄荷丶微微凉

人生若只如初见,何事秋风悲画扇。

摘要: import cn.idestiny.util.GeneratedArray; /** * @Auther: FAN * @Date: 2018/8/26 19:48 * @Description:快速排序 **/ public class QuickSort { public static void main(String[] args) { int[] a... 阅读全文
posted @ 2018-08-26 23:30 淡淡薄荷丶微微凉 阅读(237) 评论(0) 推荐(0) 编辑
摘要: import cn.idestiny.util.GeneratedArray; import java.util.Arrays; /** * @Auther: FAN * @Date: 2018/8/26 22:54 * @Description: * 比较Merge Sort和双路快速排序和三路快排三种排序算法的性能效率 * 对于包含有大量重复数据的数组, 三路快排有巨大的优势 ... 阅读全文
posted @ 2018-08-26 23:30 淡淡薄荷丶微微凉 阅读(395) 评论(0) 推荐(0) 编辑
摘要: import cn.idestiny.util.GeneratedArray; /** * @Auther: FAN * @Date: 2018/8/26 19:48 * @Description:快速排序 **/ public class QuickSort { public static void main(String[] args) { int[] a... 阅读全文
posted @ 2018-08-26 23:29 淡淡薄荷丶微微凉 阅读(176) 评论(0) 推荐(0) 编辑
摘要: /** * 排序算法工具类 */ public class GeneratedArray { /** * * 生成随机长度数组[min,max) * * @param min 最小值 * @param max 最大值 * @param num * @return */ public static... 阅读全文
posted @ 2018-08-26 12:16 淡淡薄荷丶微微凉 阅读(220) 评论(0) 推荐(0) 编辑
摘要: import cn.idestiny.util.GeneratedArray; /** * @Auther: FAN * @Date: 2018/8/25 20:11 * @Description:选择排序 每次排序选择出最小的数字放在对应位置 * 1) 3,5,1,2 最小值 1 和3交换 * 2) 1,5,3,2 最小值 2 和5交换 * 3) 1,2,3,5 排序完成 **... 阅读全文
posted @ 2018-08-26 12:14 淡淡薄荷丶微微凉 阅读(103) 评论(0) 推荐(0) 编辑
摘要: import cn.idestiny.util.GeneratedArray; /** * 插入排序算法实现 */ public class InsertionSort { public static void main(String[] args) { //随机生成指定长度数组 int[] randomarr = GeneratedArray.... 阅读全文
posted @ 2018-08-26 12:14 淡淡薄荷丶微微凉 阅读(79) 评论(0) 推荐(0) 编辑
摘要: import cn.idestiny.util.GeneratedArray; /** * @Auther: FAN * @Date: 2018/8/25 22:25 * @Description:希尔排序 * * 重点:设置增量 * 举例来说,含有1000个数据项的数组可能先以364为增量,然后以121为增量,以40为增量, * 以13为增量,以4为增量,最后以 1为增... 阅读全文
posted @ 2018-08-26 12:13 淡淡薄荷丶微微凉 阅读(103) 评论(0) 推荐(0) 编辑
摘要: import cn.idestiny.util.GeneratedArray; /** * @Auther: FAN * @Date: 2018/8/25 21:21 * @Description:冒泡排序 * 1) 4,2,5,3,7,1 * 2) 2,4,3,5,1,7 * 3) 2,3,4,1,5,7 * 4) 2,3,1,4,5,7 * 5) 2,1,3,4,5,7 ... 阅读全文
posted @ 2018-08-26 12:13 淡淡薄荷丶微微凉 阅读(95) 评论(0) 推荐(0) 编辑
摘要: import cn.idestiny.util.GeneratedArray; import java.util.Arrays; /** * @Auther: FAN * @Date: 2018/8/26 9:46 * @Description:归并排序(分治法) * (分治法将问题分(divide)成一些小的问题然后递归求解,而治(conquer)的阶段则将分的阶段得到的各答案"修... 阅读全文
posted @ 2018-08-26 11:22 淡淡薄荷丶微微凉 阅读(154) 评论(0) 推荐(0) 编辑