摘要: 900. Closest Binary Search Tree Value https://www.lintcode.com/problem/closest-binary-search-tree-value/description?_from=ladder&&fromId=1 1. 非递归方法:求B 阅读全文
posted @ 2019-05-03 08:20 Jenna777 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 127. Topological Sorting https://www.lintcode.com/problem/topological-sorting/description?_from=ladder&&fromId=1 1. 用Map来存储入度。可以用数组来存吗?不可以。 Map<Direct 阅读全文
posted @ 2019-05-02 04:34 Jenna777 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 611. Knight Shortest Path https://www.lintcode.com/problem/knight-shortest-path/description?_from=ladder&&fromId=1 137. Clone Graph https://www.lintco 阅读全文
posted @ 2019-04-30 07:11 Jenna777 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 615. Course Schedule https://www.lintcode.com/problem/course-schedule/description?_from=ladder&&fromId=1 为什么不可以用 for(int[] prerequisite: prerequisites 阅读全文
posted @ 2019-04-29 06:59 Jenna777 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 433. Number of Islands https://www.lintcode.com/problem/number-of-islands/description?_from=ladder&&fromId=1 BFS: 69. Binary Tree Level Order Traversa 阅读全文
posted @ 2019-04-28 03:47 Jenna777 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 5. Kth Largest Element (quick sort的变种) https://www.lintcode.com/problem/kth-largest-element/description?_from=ladder&&fromId=1 阅读全文
posted @ 2019-04-28 01:25 Jenna777 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 143. Sort Colors II (quick sort 变种) https://www.lintcode.com/problem/sort-colors-ii/description?_from=ladder&&fromId=1 57. 3Sum https://www.lintcode.c 阅读全文
posted @ 2019-04-27 08:23 Jenna777 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 521. Remove Duplicate Numbers in Array https://www.lintcode.com/problem/remove-duplicate-numbers-in-array/description?_from=ladder&&fromId=1 总结:数组中比较 阅读全文
posted @ 2019-04-23 02:38 Jenna777 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 607. Two Sum III - Data structure design (查找问题:从 map 中查找一个元素) 双指针:用一个指针遍历 map 所有元素,用另一个指针在 map 中找 remain https://www.lintcode.com/problem/two-sum-iii- 阅读全文
posted @ 2019-04-21 09:00 Jenna777 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 228. Middle of Linked List https://www.lintcode.com/problem/middle-of-linked-list/description?_from=ladder&&fromId=1 快慢指针,快指针每次走两步,慢指针每次一步。快指针到尾的时候,慢指 阅读全文
posted @ 2019-04-20 04:42 Jenna777 阅读(107) 评论(0) 推荐(0) 编辑