2018年5月10日
摘要: 66 2 758 . Bold Words in String public String boldWords(String[] words, String S) { Set<Integer> set = new HashSet<>(); for (int i = 0; i < S.length() 阅读全文
posted @ 2018-05-10 00:34 wheleetcode 阅读(167) 评论(0) 推荐(0) 编辑
  2018年2月6日
摘要: 1 the advantages of spring boot simple fast and convenient quickly set up microservice 2 springboot infrastructure directory src/main/java program dev 阅读全文
posted @ 2018-02-06 15:29 wheleetcode 阅读(441) 评论(0) 推荐(0) 编辑
  2017年12月22日
摘要: 1 Strings Homomorphism public boolean isIsomorphic(String s, String t) { // write your code here char[] ss = s.toCharArray(); char[] tt = t.toCharArra 阅读全文
posted @ 2017-12-22 23:02 wheleetcode 阅读(137) 评论(0) 推荐(0) 编辑
  2017年11月22日
摘要: 定义 不用的对象,资源不能被释放 场景 1 数据库连接,文件连接没有关掉 2 hash集合修改结合中的元素可能导致内存泄漏,因为修改元素后,hash值有可能修改,就找不到原来对象,所以不能删除了 public class Mytest { public static void main(String 阅读全文
posted @ 2017-11-22 13:17 wheleetcode 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 1 overload 重载 override 重写 2 可变参数列表 public static int add(int ... i) { int sum = 0; for (int j : i) { sum += j; } return sum; } 3享元模式 内蕴状态和外蕴状态 i.spend 阅读全文
posted @ 2017-11-22 13:17 wheleetcode 阅读(143) 评论(0) 推荐(0) 编辑
  2017年11月19日
摘要: 1 ThreadLocal public class TestM { public static void main(String[] args) { for (int i = 0; i < 2; i++) { new Thread() { @Override public void run() { 阅读全文
posted @ 2017-11-19 00:11 wheleetcode 阅读(166) 评论(0) 推荐(0) 编辑
  2017年11月10日
摘要: 1 创建一个目录,并交给git管理 mkdir gitlearn cd gitlern git init 2 添加文件到本地仓库 git add 1.txt git commit -c "add 1 file" 3 查看仓库状态 git status git diff a.txt HEAD指向的版本 阅读全文
posted @ 2017-11-10 11:39 wheleetcode 阅读(132) 评论(0) 推荐(0) 编辑
  2017年11月6日
摘要: • 矩阵上的问题(3题) Search a 2D Matrix II public int searchMatrix(int[][] matrix, int target) { // write your code here int n = matrix.length; if (n == 0) { 阅读全文
posted @ 2017-11-06 23:54 wheleetcode 阅读(403) 评论(0) 推荐(0) 编辑
  2017年10月31日
摘要: BFS 类问题 1 Surrounded Regions public void surroundedRegions(char[][] board) { int n = board.length; if (n == 0) { return; } int m = board[0].length; fo 阅读全文
posted @ 2017-10-31 11:35 wheleetcode 阅读(345) 评论(0) 推荐(0) 编辑
  2017年10月29日
摘要: DFS的两种理解方式:1. 按照实际执行顺序模拟 (适合枚举型DFS,下节课内容)2. 按照DFS的定义宏观理解 (适合分治型DFS,本节课内容) 1 Convert BST to Greater Tree int sum = 0; public TreeNode convertBST(TreeNo 阅读全文
posted @ 2017-10-29 15:41 wheleetcode 阅读(328) 评论(0) 推荐(0) 编辑