上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页
摘要: package com.fh.interview; /** * 中断测试 * * @author * @create 2018-05-27 下午3:18 **/ public class InterruptDemo { public static void main(String[] args) { 阅读全文
posted @ 2018-05-27 15:26 默默行走 阅读(657) 评论(0) 推荐(0) 编辑
摘要: package com.fh.interview; import java.util.concurrent.*; /**线程创建的方式 * @author * @create 2018-05-27 下午2:58 **/ public class CreateTHread { public stati 阅读全文
posted @ 2018-05-27 15:10 默默行走 阅读(95) 评论(0) 推荐(0) 编辑
摘要: package com.fh.interview; /** * @author 死锁测试 * @create 2018-05-27 下午2:26 **/ public class DeadLockDemo { public static String resourceA = "A"; public 阅读全文
posted @ 2018-05-27 14:45 默默行走 阅读(362) 评论(0) 推荐(0) 编辑
摘要: /** * 基数排序 */ @Test public void RadioSort(){ int[] array = {123,345,5555,66666,764,12,33,455}; int maxLength = maxLength(array); int[] newArray = sort 阅读全文
posted @ 2018-05-27 13:52 默默行走 阅读(122) 评论(0) 推荐(0) 编辑
摘要: /** * 桶排序 */ @Test public void bucketSort(){ int[] array = {5,6,7,8,9,1,2,3,5,6,7,8,9}; buckerSort(array); System.out.println(Arrays.toString(array)); 阅读全文
posted @ 2018-05-27 11:35 默默行走 阅读(98) 评论(0) 推荐(0) 编辑
摘要: /** * 计数排序 * 对于一个输入数组中的一个元素x, * 只要我们知道了这个数组中比x小的元素的个数, * 那么我们就可以直接把x放到(x+1)的位置上。这就是计数排序的基本思想 */ @Test public void countSort(){ int[] array = {1,4,5,6, 阅读全文
posted @ 2018-05-26 16:30 默默行走 阅读(75) 评论(0) 推荐(0) 编辑
摘要: /** * 首先将无序序列构建成大顶堆或小顶对(父节点大于等于左右字节点的值) * arr[i]>=arr[2i+1] && arr[i]>=arr[2i+2] * 交换堆顶和末尾元素的值,重新调整堆结构 * 交换数据,重复上面的步骤 * * 第一个非叶子节点时(arr.length/2)-1 * 阅读全文
posted @ 2018-05-26 16:02 默默行走 阅读(93) 评论(0) 推荐(0) 编辑
摘要: /** * 借助临时数组进行移动 */ @Test public void mergerSort(){ int[] arr={1,4,5,6,7,8,3,2,4,6,7,3,5,6,4,3,2}; int[] temp = new int[arr.length]; mergerSort(arr,0, 阅读全文
posted @ 2018-05-26 14:44 默默行走 阅读(96) 评论(0) 推荐(0) 编辑
摘要: package com.fh.algo; /** * 排序算法 * * @author * @create 2018-05-26 下午1:00 **/ import org.junit.Test; /** * 排序算法的学习 */ public class Sort { private int[] 阅读全文
posted @ 2018-05-26 13:53 默默行走 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 代码是网上抄的,自己练练手 RSA加密 package com.answern.openplatform; import org.apache.commons.codec.binary.Base64; import org.junit.Test; import javax.crypto.Cipher 阅读全文
posted @ 2018-05-25 17:49 默默行走 阅读(1244) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页