自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 Java快速排序

public static void quickSort(int[] input){ if(input.length>1){ quickSort(input,0,input.length-1);//如果数组长度大于1进入方法 } } private static void quickSort(int[] a, int from, int to) { if( from > to) {//递归的return判断 ..

2020-06-04 15:36:00 77

原创 递归方法得到数组最大值

递归方法得到数组最大值帮助大家理解递归,public class Solution{ public static int getMax(int[] arr, int from, int to){ if(from == to){//递归推出判断,利用了分治的思路。 return arr[from]; } int middle=((to-from)>>1)+from;//避免越界 int leftma

2020-05-31 18:44:42 108

原创 排序,冒泡排序,选择排序,插入排序

简单记录三种排序方法public class Sorts{ public static int[] bubbleSort(int[] input){//冒泡排序 int temp; boolean flag;//用于标记是否已经排好 for(int i=0; i< input.length;i++){//一共走了length-1次 flag=false;//每一轮交换开始都生命现在没有开始排

2020-05-30 17:51:44 79

原创 JAVA实现从0加到100000000 (多线程)

public class Counter implements Runnable{ private SubSum subSum; private int countFrom; private int countTo; private int threadNo; public Counter(SubSum subSum, int countFrom,int countTo,int threadNo){ this.subSum=subSum;

2020-05-17 21:21:55 535

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除