![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java数据结构算法
爱码仕
做一个严谨负责的程序猿。。。
展开
-
有序数组增删改查找
public class MyOrderArray { private long[] arr; //表示有效数据的长度 private int elements; public MyOrderArray() { arr = new long[50]; } public MyOrderArray(i原创 2017-07-05 10:20:25 · 426 阅读 · 1 评论 -
简单排序
1.冒泡排序 public static void sort(long[] arr) { long tmp = 0; for(int i = 0; i for(int j = arr.length - 1; j > i; j--) { if(arr[j]原创 2017-07-05 10:50:05 · 210 阅读 · 0 评论