LeetCode
DXT00
这个作者很懒,什么都没留下…
展开
-
Leetcode --- 684. Redundant Connection 判断是否有环 /并查集
684.Redundant ConnectionMedium727196FavoriteShareIn this problem, a tree is anundirectedgraph that is connected and has no cycles.The given input is a graph that started as a tree with N n...转载 2019-08-14 19:29:58 · 302 阅读 · 0 评论 -
Leetcode -- 332. Reconstruct Itinerary --优先级队列 / 图的后序遍历
332.Reconstruct ItineraryGiven a list of airline tickets represented by pairs of departure and arrival airports[from, to], reconstruct the itinerary in order. All of the tickets belong to a man w...原创 2019-08-14 14:17:10 · 246 阅读 · 0 评论 -
207. Course Schedule -- 判断图是否有环
207.Course ScheduleMedium186890FavoriteShareThere are a total ofncourses you have to take, labeled from0ton-1.Some courses may have prerequisites, for example to take course 0 you have t...原创 2019-07-06 17:22:04 · 148 阅读 · 0 评论 -
dp~Leetcode 377. Combination Sum IV
377. Combination Sum IVGiven an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target.Example:nums = [1, 2, 3]ta...原创 2018-02-21 21:12:11 · 185 阅读 · 0 评论 -
dp~Leetcode 718. Maximum Length of Repeated Subarray
718. Maximum Length of Repeated SubarrayGiven two integer arrays A and B, return the maximum length of an subarray that appears in both arrays.Example 1:Input:A: [1,2,3,2,1]B: [3,2,1,4,7]Output: 3...原创 2018-02-20 23:37:30 · 175 阅读 · 0 评论 -
Leetcode -- 842. Split Array into Fibonacci Sequence
842.Split Array into Fibonacci SequenceMedium296102FavoriteShareGiven a stringSof digits, such asS = "123456579", we can split it into aFibonacci-like sequence[123, 456, 579].Formally, a...转载 2019-09-11 20:53:04 · 140 阅读 · 0 评论