摘要: https://leetcode.com/problems/unique-binary-search-trees/discuss/31666/DP-Solution-in-6-lines-with-explanation.-F(i-n)-G(i-1)-*-G(n-i) 阅读全文
posted @ 2018-09-17 12:47 jasoncool1 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1 //Recursive 2 class Solution { 3 List res = new ArrayList(); 4 public List inorderTraversal(TreeNode root) { 5 if (root != null) { 6 inorderTraversal(root.left)... 阅读全文
posted @ 2018-09-17 05:49 jasoncool1 阅读(100) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/restore-ip-addresses/discuss/30944/Very-simple-DFS-solution 阅读全文
posted @ 2018-09-17 04:01 jasoncool1 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 public ListNode reverseBetween(ListNode head, int m, int n) { 3 ListNode node1 = head; 4 // int len = 0; //可以不用加 5 // while(node1 != nu... 阅读全文
posted @ 2018-09-17 01:01 jasoncool1 阅读(87) 评论(0) 推荐(0) 编辑