![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
排序算法
丶随意
问君何所有,烤串喝啤酒
展开
-
简单选择排序
public class Sort { private final static Integer[] arr = {4, 2134, 1, 24, 451, 2, 3, 5, 45, 345768, 789, 5}; public static void main(String[] args) { for (int i = 0; i < arr.length; i++)原创 2017-11-07 23:07:11 · 134 阅读 · 0 评论 -
冒泡排序
将相邻的两个数据比较,如果符合条件的交换位置 int[] array = {14,14,23,534,645,75,6867,95,673,52,43}; for (int i = 0; i < array.length; i++) { for (int j = 0; j < array.length-1; j++) { int i2 = arr原创 2017-11-22 23:13:53 · 129 阅读 · 0 评论