![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
不懂
zyp7355
这个作者很懒,什么都没留下…
展开
-
leetcode 56 merge intervals
Merge Intervals Medium 3494 257 Add to List Share Given 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 · 89 阅读 · 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 · 125 阅读 · 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 · 85 阅读 · 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 6 The flattened tree should look like: 1 2 3 4 5 6 知识点 stack 先进先出 pop ...原创 2020-02-28 13:49:42 · 76 阅读 · 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: 3 Output: 5 Explanation: Given n = 3, there are a total of 5 unique BST’s: 1 3 3 ...原创 2020-02-25 05:48:57 · 63 阅读 · 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 · 70 阅读 · 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 · 81 阅读 · 0 评论 -
leetcode#50 Pow(x, n)
mplement pow(x, n), which calculates x raised to the power n (xn). Example 1: Input: 2.00000, 10 Output: 1024.00000 Example 2: Input: 2.10000, 3 Output: 9.26100 Example 3: Input: 2.00000, -2 Output: 0...原创 2020-02-11 08:58:18 · 86 阅读 · 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 = 2 Output: [ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4], ] 回溯法 backtrack 一直是我不明白的部分 今天想专...原创 2020-01-31 04:13:04 · 63 阅读 · 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 · 70 阅读 · 0 评论