不懂
zyp7355
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
leetcode 56 merge intervals
Merge IntervalsMedium3494257Add to ListShareGiven a collection of intervals, merge all overlapping intervals.Example 1:Input: [[1,3],[2,6],[8,10],[15,18]]Output: [[1,6],[8,10],[15,18]]Expl...原创 2020-04-08 03:38:05 · 158 阅读 · 0 评论 -
leetcode #138. Copy List with Random Pointer
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list.The Linked List is represented in th...原创 2020-03-05 04:14:26 · 191 阅读 · 0 评论 -
leetcode #131 Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.Example:Input: “aab”Output:[[“aa”,“b”],[“a”,“a”,“b”]]...原创 2020-03-04 12:01:58 · 123 阅读 · 0 评论 -
leetcode #114. Flatten Binary Tree to Linked List
Given a binary tree, flatten it to a linked list in-place.For example, given the following tree:1/ 2 5/ \ 3 4 6The flattened tree should look like:123456知识点stack 先进先出pop ...原创 2020-02-28 13:49:42 · 115 阅读 · 0 评论 -
leetnode#96. Unique Binary Search Trees
Given n, how many structurally unique BST’s (binary search trees) that store values 1 … n?Example:Input: 3Output: 5Explanation:Given n = 3, there are a total of 5 unique BST’s:1 3 3 ...原创 2020-02-25 05:48:57 · 109 阅读 · 0 评论 -
leetcode#90. Subsets II
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Example:Input: [1,2,2]Outp...原创 2020-02-21 06:32:48 · 118 阅读 · 0 评论 -
leetcode # 78 subset
Given a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Example:Input: nums = [1,2,3]Output:[[3],[1],[2],...原创 2020-02-19 09:36:24 · 118 阅读 · 0 评论 -
leetcode#50 Pow(x, n)
mplement pow(x, n), which calculates x raised to the power n (xn).Example 1:Input: 2.00000, 10Output: 1024.00000Example 2:Input: 2.10000, 3Output: 9.26100Example 3:Input: 2.00000, -2Output: 0...原创 2020-02-11 08:58:18 · 122 阅读 · 0 评论 -
leetcode #77. Combinations
Given two integers n and k, return all possible combinations of k numbers out of 1 … n.Example:Input: n = 4, k = 2Output:[[2,4],[3,4],[2,3],[1,2],[1,3],[1,4],]回溯法 backtrack 一直是我不明白的部分今天想专...原创 2020-01-31 04:13:04 · 106 阅读 · 0 评论 -
leetcode#22. Generate Parentheses
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[“((()))”,“(()())”,“(())()”,“()(())”,“()()()”...原创 2020-01-24 14:09:51 · 119 阅读 · 0 评论
分享