原创 平時使用的一些快捷鍵
有些常用的快捷鍵,但老是記不住,只好寫到這裏。 1.intellij 的快捷鍵 (alt + 7) : outline
原创 linux下如何查看網卡的流量
命令如下: watch -n 1 “ifconfig enp3s0 | grep bytes”
原创 java併發每日一練
問題 使用 wait notify 實現一個隊列,隊列有2個方法,add 和 get 。add方法往隊列中添加元素,get方法往隊列中獲得元素。隊列必須是線程安全的。如果get執行時,隊列爲空,線程必須阻塞等待,直到有隊列有數據。
原创 lintcode-->玩具工廠
package 玩具工廠; /** * Your object will be instantiated and called as such: * ToyFactory tf = new ToyFactory(); * Toy
原创 leetcode-最接近0的子數組和
public class Solution { /** * @param nums: A list of integers * @return: A list of integers includes the
原创 leetcode-118. Pascal's Triangle
func generate(numRows int) [][]int { var arr [][] int; arr = make([][]int, numRows); var i, j int; fo
原创 lintcode-二叉樹中查找區間
/** * Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; *
原创 當前排列的下一個排列(leetcode31)
package com.snnu; import java.util.Arrays; /** * Created by torch on 2017-06-02. */ public class Permutation {
原创 n劃分爲1,2,3等等(動態規劃)
package bd_algo; import java.util.Scanner; public class coin { public static void main(String[] args) { S
原创 lintcode-bitswap
package bd_algo; public class bit_tran { public static void main(String[] args) { System.out.println(bitSw
原创 華爲筆試——字符集合
package 字符集合; import java.util.HashMap; import java.util.Scanner; /** * Created by h on 16-12-28. */ public class M
原创 快排
package bd_algo; /** * Created by Administrator on 2017/8/28. */ public class QS { public static void main(Stri
原创 lintcode-最後一個單詞的長度
package bd_algo; import java.util.LinkedHashMap; /** * Created by Administrator on 2017/8/29. */ public class Lengt
原创 lintcode括號匹配
package bd_algo; import java.util.HashMap; import java.util.Map; import java.util.Stack; /** * Created by Administra
原创 hihocoder1066-並查集
package com.snnu; import java.util.HashMap; import java.util.Scanner; public class union_find { static int maxn =