06 2018 档案

摘要:827. Making A Large Island Input: A 2D Integer grid Output: the largest island when you change one 0 to 1 Limit: can only change one 0 to 1 如何确定larges 阅读全文
posted @ 2018-06-15 21:41 AugusKong 阅读(153) 评论(0) 推荐(0)
摘要:什么是递归过程? 为什么要使用递归? 递归和迭代的优缺点 过程演化的几种典型模式: 线性递归 线性迭代 树形递归 迭代过程 :迭代过程是那种 1. 状态可以用固定书目的状态变量描述的计算过程; 2. 同时又存在着一套固定的规则,描述了计算过程在从一个状态到下一个状态转换时,这些变量的更新方式 3. 阅读全文
posted @ 2018-06-13 11:23 AugusKong 阅读(129) 评论(0) 推荐(0)
摘要:690. Employee Importance 最简单的DFS, 设置了一个公司上下级关系的背景而已, input: 一个employee对象的list, 一个employee id, output: total important value of the employee and his su 阅读全文
posted @ 2018-06-09 23:44 AugusKong 阅读(128) 评论(0) 推荐(0)
摘要:Lint 448. Inorder Successor in BST "https://www.lintcode.com/problem/inorder successor in bst/description" 第一选择是 p.right 的 leftMost节点 第二选择是 p.parent, 阅读全文
posted @ 2018-06-08 02:27 AugusKong 阅读(231) 评论(0) 推荐(0)
摘要:```java PriorityQueue queue= new PriorityQueue(lists.length,new Comparator(){ @Override public int compare(ListNode o1,ListNode o2){ if (o1.val 阅读全文
posted @ 2018-06-04 11:26 AugusKong 阅读(129) 评论(0) 推荐(0)