摘要: Microsoft Windows [版本 10.0.14393](c) 2016 Microsoft Corporation。保留所有权利。 C:\Windows\system32>netstat -aon | findstr "8080" TCP 0.0.0.0:8080 0.0.0.0:0 L 阅读全文
posted @ 2017-05-22 13:36 wqkant 阅读(648) 评论(0) 推荐(0) 编辑
摘要: public class BoyerMoore { private static int search(String txt,String pat){ int[] right=new int[256]; final int N=txt.length(); final int M=pat.length(); ... 阅读全文
posted @ 2017-05-22 12:42 wqkant 阅读(269) 评论(0) 推荐(0) 编辑
摘要: import java.util.ArrayList; import org.junit.Test; public class TriNode{ private static final int R=256; private static final ArrayList keysWithPrefix=new ArrayList(); public static... 阅读全文
posted @ 2017-05-17 14:23 wqkant 阅读(266) 评论(0) 推荐(0) 编辑
摘要: public class FindKMin{ int[] nums=new int[1000]; int k=10;//方法一,先排序,查找前k个 public void sortAndFind(){ int[] arr=Arrays.copyOf(nums, nums.length); Arrays.sort(arr); ... 阅读全文
posted @ 2017-05-15 15:02 wqkant 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 加上Executor,BlockingQueue 阅读全文
posted @ 2017-05-14 22:10 wqkant 阅读(155) 评论(0) 推荐(0) 编辑
摘要: public class LISEfficient { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); //number of elements int[] ar = new int[n]; /... 阅读全文
posted @ 2017-05-14 00:23 wqkant 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n. For example: Given n = 13, Retur 阅读全文
posted @ 2017-05-13 19:10 wqkant 阅读(152) 评论(0) 推荐(0) 编辑
摘要: //Node类为单向链表static class Node implements Map.Entry { final int hash; final K key; V value; Node next; Node(int hash, K key, V value, Node next) { ... 阅读全文
posted @ 2017-05-09 14:34 wqkant 阅读(261) 评论(0) 推荐(0) 编辑
摘要: An iterator for lists that allows the programmer to traverse the list in either direction, modify the list during iteration, and obtain the iterator's 阅读全文
posted @ 2017-05-08 21:37 wqkant 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 基本元素为对象时,浅拷贝,拷贝引用(ArrayList 的clone()调用Arrays.copyof(),官方文档注明为浅拷贝) falsefalse[1, 2][1, 2][555555, 2][555555, 2] 为值时, 阅读全文
posted @ 2017-05-08 20:21 wqkant 阅读(3296) 评论(0) 推荐(0) 编辑