- 博客(3)
- 资源 (1)
- 收藏
- 关注
原创 斐波那契数列递归算法的优化
public class Fibonacci { //优化使用的数组 static long[] cach = new long[51]; public static void main(String[] args) { long a = System.currentTimeMillis(); System.out.println( fd( 50 ) ); long l = System.currentTimeMillis(); System.out.println( l - a
2020-07-01 21:09:49 479
原创 小白的数组冒泡排序实现代码
public class Bubble_Sort { public static void main(String[] args) { int[] arr = {1, 5, 4, 7, 9, 3, 8, 6, 2,}; bubbleSort( arr ); } private static void bubbleSort(int[] arr) { for (int i = 0; i < arr.length - 1; i++) { for (int j = 0; j &l
2020-06-30 19:12:52 121
原创 数组的二分查找实现代码
public class twofenchazhao { public static void main(String[] args) { int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int a = 6; int index = binarySearchForIndex( arr, a ); System.out.println( index ); } private static int binarySearchForIndex(i
2020-06-30 19:08:53 116
集合笔记整理.doc
2020-07-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人