摘要: #include #include using namespace std; #define N 100 int parent[N]; struct road{ int begin; int end; int value; }; bool cmp(road a, road b){ return a.value < b.value; } int fi... 阅读全文
posted @ 2017-11-20 17:21 那不勒斯冰淇淋 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Nov, 9, 2017. https://leetcode.com/problemset/algorithms/?topicSlugs=union-find%2Clinked-list Given an unsorted array of integers, find the length of 阅读全文
posted @ 2017-11-09 22:23 那不勒斯冰淇淋 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Date: Nov. 8, 2017. Problem: https://leetcode.com/problems/maximal-rectangle/description/ Description: Given a 2D binary matrix filled with 0's and 1' 阅读全文
posted @ 2017-11-08 21:16 那不勒斯冰淇淋 阅读(242) 评论(0) 推荐(0) 编辑
摘要: Date: Nov, 7, 2017. Problem: https://leetcode.com/problems/merge-k-sorted-lists/discuss/ Description: Merge k sorted linked lists and return it as one 阅读全文
posted @ 2017-11-07 21:45 那不勒斯冰淇淋 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Date: Nov. 6, 2017 Problem: https://leetcode.com/problems/smallest-range/description/ Description: You have k lists of sorted integers in ascending or 阅读全文
posted @ 2017-11-06 20:56 那不勒斯冰淇淋 阅读(273) 评论(0) 推荐(0) 编辑
摘要: Date: Nov. 4, 2017 Problem: https://leetcode.com/problems/largest-rectangle-in-histogram/description/ Description: Given n non-negative integers repre 阅读全文
posted @ 2017-11-04 15:01 那不勒斯冰淇淋 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Date: Nov. 3, 2017 Problem: https://leetcode.com/problems/jump-game-ii/description/ Description: Given an array of non-negative integers, you are init 阅读全文
posted @ 2017-11-03 20:39 那不勒斯冰淇淋 阅读(415) 评论(2) 推荐(0) 编辑
摘要: Date: Nov. 2, 2017 Problem: https://leetcode.com/problems/trapping-rain-water/description/ Description: Given n non-negative integers representing an 阅读全文
posted @ 2017-11-02 21:45 那不勒斯冰淇淋 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Date: Nov. 1, 2017 Problem: https://leetcode.com/problems/first-missing-positive/description/ Description: Given an unsorted integer array, find the f 阅读全文
posted @ 2017-11-01 20:49 那不勒斯冰淇淋 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Date: Oct. 31, 2017 Problem: https://leetcode.com/problems/median-of-two-sorted-arrays/solution/ Description: There are two sorted arrays nums1 and nu 阅读全文
posted @ 2017-10-31 21:02 那不勒斯冰淇淋 阅读(147) 评论(0) 推荐(0) 编辑