摘要:
09 插入排序 思路分析: 核心思想为:把无序数组的第一个元素当成有序数组,每次往后面(第二个元素开始)拿一个元素,把它与有序数组重新排序成有序数组,直到拿到最后一个元素为止. 注意:升序就是假定有序数组为升序来求解的,降序是假定有序数组是降序来求解的 int[] a={1,77,66,3,20 阅读全文
posted @ 2020-11-25 20:38
SSS翱翔万里
阅读(206)
评论(1)
推荐(2)
摘要:
08 选择排序 准备工作 public class SelectionSort { public static void main(String[] args) { //selection sort是选择排序的意思 int[] a={55,77,22,44,88,-8}; System.out.pr 阅读全文
posted @ 2020-11-25 12:56
SSS翱翔万里
阅读(156)
评论(2)
推荐(2)
摘要:
数组的反序 准备工作 public class InvertedSequence { public static void main(String[] args) { //inverted sequence是反序的意思 int[] a={2,77,-4,6,11}; System.out.print 阅读全文
posted @ 2020-11-25 10:51
SSS翱翔万里
阅读(588)
评论(0)
推荐(2)

浙公网安备 33010602011771号