摘要: package com.kaibing.sortandfind; import org.junit.jupiter.api.Test; public class Find { public int[] arr = {1, 2, 3, 4, 5}; @Test public void binaryFind() { System.out.print... 阅读全文
posted @ 2018-06-29 14:09 楷兵 阅读(113) 评论(0) 推荐(0) 编辑
摘要: package com.kaibing.sort; import org.junit.jupiter.api.Test; public class UpSort { public int[] arr = {1, 3, 2, 7, 5}; /** * 冒泡排序:思想每次把目标(最大或最小)移到末尾 * 时间:平均=O(n^2) | 最坏=O(n^2) ... 阅读全文
posted @ 2018-06-29 11:20 楷兵 阅读(108) 评论(0) 推荐(0) 编辑