摘要: 排序 冒泡排序 基本思想从输入序列的第一个元素到最后一个元素进行两两比较。以最小序列为例,最小元素会如同气泡一样漂浮到序列顶端。 //O(n^2) void bubbleSort(int[] a){ for(int i = 0;i < a.length -1;i++){ for(int j = 0; 阅读全文
posted @ 2020-08-05 08:47 Dave-Mo 阅读(64) 评论(0) 推荐(0)