题目: 请实现 copyRandomList 函数,复制一个复杂链表。在复杂链表中,每个节点除了有一个 next 指针指向下一个节点,还有一个 random 指针指向链表中的任意节点或者 null。 来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems ...
分类:
编程语言 时间:
2020-07-10 16:54:08
阅读次数:
62
package LeetCode_680 /** * 680. Valid Palindrome II * https://leetcode.com/problems/delete-operation-for-two-strings/description/ * * Given two words ...
分类:
其他好文 时间:
2020-07-10 09:29:42
阅读次数:
68
题目: 给定一个排序链表,删除所有重复的元素,使得每个元素只出现一次。示例 1:输入: 1->1->2输出: 1->2示例 2:输入: 1->1->2->3->3输出: 1->2->3来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/remove- ...
分类:
编程语言 时间:
2020-07-09 15:27:18
阅读次数:
60
给定一棵二叉树,想象自己站在它的右侧,按照从顶部到底部的顺序,返回从右侧所能看到的节点值。 示例: 输入: [1,2,3,null,5,null,4]输出: [1, 3, 4] 来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/binary-tre ...
分类:
其他好文 时间:
2020-07-09 10:38:40
阅读次数:
57
Announcements - This repository provides references to recent advances in deep-learning-based inverse problems (DLB IP), and will be updated once ever ...
分类:
其他好文 时间:
2020-07-09 01:15:07
阅读次数:
101
package LeetCode_523 /** * 523. Continuous Subarray Sum * https://leetcode.com/problems/continuous-subarray-sum/description/ * * Given a list of non-n ...
分类:
其他好文 时间:
2020-07-09 00:47:21
阅读次数:
54
链接:https://leetcode-cn.com/problems/plus-one/ 代码 class Solution { public: vector<int> plusOne(vector<int>& digits) { int t = 1; for (int i = digits.si ...
分类:
其他好文 时间:
2020-07-08 21:27:49
阅读次数:
43
面试题 16.11. 跳水板 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/diving-board-lcci 题目 你正在使用一堆木板建造跳水板。有两种类型的木板,其中长度较短的木板长度为 shorter,长度较长的木板长度为 longer。你 ...
分类:
编程语言 时间:
2020-07-08 20:09:02
阅读次数:
65
输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历结果。如果是则返回 true,否则返回 false。假设输入的数组的任意两个数字都互不相同。 方法一:递归分治 根据二叉搜索树的定义,可以通过递归,判断所有子树的 正确性 (即其后序遍历是否满足二叉搜索树的定义) ,若所有子树都正确,则此序列为 ...
分类:
其他好文 时间:
2020-07-08 15:10:32
阅读次数:
50
地址 https://leetcode-cn.com/problems/diving-board-lcci/ 你正在使用一堆木板建造跳水板。有两种类型的木板,其中长度较短的木板长度为shorter,长度较长的木板长度为longer。你必须正好使用k块木板。编写一个方法,生成跳水板所有可能的长度。 返 ...
分类:
其他好文 时间:
2020-07-08 13:22:14
阅读次数:
45