12 2018 档案

摘要:1、如果用“.”作为分隔的话,必须是如下写法,String.split("\\."),这样才能正确的分隔开,不能用String.split("."); 2、如果用“|”作为分隔的话,必须是如下写法,String.split("\\|"),这样才能正确的分隔开,不能用String.split("|") 阅读全文
posted @ 2018-12-10 04:20 jasoncool1
摘要:handle overflow的情况 要是num == Integer.MAX_VALUE 直接return res 注意prev <= num 的时候 讨论才有意义 阅读全文
posted @ 2018-12-10 01:28 jasoncool1
摘要:只有edit distance == 1的才能返回true 最后一个return返回的事是否后面只有一个char 因为前面都一样 只有是有的情况下 才能返回true 阅读全文
posted @ 2018-12-10 00:36 jasoncool1
摘要:1 class Solution { 2 TreeNode newRoot; 3 TreeNode prev; 4 public TreeNode upsideDownBinaryTree(TreeNode root) { 5 if(root == null) return root; 6 helper(root); 7 ... 阅读全文
posted @ 2018-12-09 12:57 jasoncool1
摘要:用curString去记录前面的String的结果 阅读全文
posted @ 2018-12-09 08:00 jasoncool1
摘要:https://leetcode.com/problems/gas-station/discuss/42591/java-greedy-solution 阅读全文
posted @ 2018-12-06 12:13 jasoncool1