www

导航

2019年2月25日 #

MergeKLists

摘要: public ListNode mergeKLists(ListNode[] lists) { if(lists==null||lists.length==0) return null; PriorityQueue minHeap=new PriorityQueue((o1, o1)->{ return o1.val-o2.val; ... 阅读全文

posted @ 2019-02-25 18:51 www_practice 阅读(166) 评论(0) 推荐(0) 编辑

Top K Frequent Elements

摘要: public List topKFrequent(int[] nums, int k){ List ret = new ArrayList(); if (nums==null || nums.length map = new HashMap(); for (int n:nums) map.put(n,map.getOrDefault(n,0)+1)... 阅读全文

posted @ 2019-02-25 18:23 www_practice 阅读(116) 评论(0) 推荐(0) 编辑

2019年2月16日 #

旋转数组的最小数字

摘要: private int minNumberInRotateArray(int [] array) { if (array == null || array.length == 0) { throw new RuntimeException("input is invalid"); } int index1 = 0;... 阅读全文

posted @ 2019-02-16 18:22 www_practice 阅读(127) 评论(0) 推荐(0) 编辑

BinarySearch(Java)

摘要: 1 private int binarySearch(int[] input, int target) { 2 if (input == null) { 3 return -1; 4 } 5 6 int index1 = 0; 7 int index2 = input.length-1... 阅读全文

posted @ 2019-02-16 17:44 www_practice 阅读(144) 评论(0) 推荐(0) 编辑

QuickSort(Java)

摘要: 1 private void quickSort(int[] input, int start, int end) { 2 if (start >= end) return; 3 4 int index = partition(input, start, end); 5 6 if (index > start) { 7 ... 阅读全文

posted @ 2019-02-16 17:32 www_practice 阅读(162) 评论(0) 推荐(0) 编辑

2018年11月18日 #

java路径

摘要: System.out.println(ResourceUtils.getURL("classpath:").getPath()); 阅读全文

posted @ 2018-11-18 11:33 www_practice 阅读(67) 评论(0) 推荐(0) 编辑

2018年11月1日 #

正想代理和反向代理

摘要: 正向代理:Shadowsocks. 代理服务器获取数据,返回给用户 反向代理:Nginx. 代理服务器分发请求,提供数据的服务器可能有很多个 阅读全文

posted @ 2018-11-01 19:43 www_practice 阅读(106) 评论(0) 推荐(0) 编辑

2018年10月24日 #

ssh

摘要: https://www.ibm.com/developerworks/cn/linux/l-cn-sshforward/ 阅读全文

posted @ 2018-10-24 14:59 www_practice 阅读(103) 评论(0) 推荐(0) 编辑

2018年9月12日 #

PHP-数组

摘要: 25, "name"=>"li", "aa"=>22); $array[] = array("age"=>24,"name"=>"ai", "aa"=>24); $array[] = array("age"=>23,"name"=>"ci", "aa"=>23); $array[] = array("age"= 阅读全文

posted @ 2018-09-12 16:32 www_practice 阅读(86) 评论(0) 推荐(0) 编辑

2018年9月5日 #

Java动态代理

摘要: Fruit.java Apple.java ProxyHandler.java Run.java 阅读全文

posted @ 2018-09-05 14:46 www_practice 阅读(168) 评论(0) 推荐(0) 编辑