题目: 找出所有相加之和为 n 的 k 个数的组合。组合中只允许含有 1 - 9 的正整数,并且每种组合中不存在重复的数字。 说明: 所有数字都是正整数。 解集不能包含重复的组合。 示例: 输入: k = 3, n = 7 输出: [[1,2,4]] 分析: 明确题目的限制条件:1、组合中只允许存在 ...
分类:
其他好文 时间:
2020-07-19 23:34:18
阅读次数:
90
题解:层次遍历的基础上加个计数器,偶数层得到的结果反转一下 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeN ...
分类:
其他好文 时间:
2020-07-18 21:52:24
阅读次数:
59
此题和之前的剑指offer32-I、II.从上到下打印二叉树大致相同在BFS的基础上只是添加了一个重排序的过程。具体代码如下: 1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * st ...
分类:
其他好文 时间:
2020-07-18 11:18:07
阅读次数:
58
260 Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. ...
分类:
其他好文 时间:
2020-07-14 21:54:31
阅读次数:
104
题目描述链接:https://leetcode-cn.com/problems/path-sum-iii/submissions/ 基本思路:此题思路和LeetCode 1367中的二叉树中的列表一题思路基本类似。即同为通过枚举方法实现。对每一个节点进行枚举,查看是否有以改节点为首的路径满足条件。 ...
分类:
其他好文 时间:
2020-07-12 20:36:10
阅读次数:
64
魔兽争霸3 冰封王座 mac原生版已在战网下载,怀旧的朋友可以下载这个魔兽争霸3 冰封王座 mac移植版 完美支持Catalina 10.15。 下载地址:https://macbox.app/a/Warcraft-iii-for-mac-xiazai.html 下面是在 catalina 10.1 ...
分类:
系统相关 时间:
2020-07-10 15:41:46
阅读次数:
388
Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be ...
分类:
其他好文 时间:
2020-07-10 09:59:09
阅读次数:
61
591. 连接图 III 中文English 给一个图中的 n 个节点, 记为 1 到 n . 在开始的时候图中没有边.你需要完成下面两个方法: connect(a, b), 添加一条连接节点 a, b的边 query(), 返回图中联通区域个数 样例 例1: 输入: ConnectingGraph ...
分类:
其他好文 时间:
2020-07-08 23:17:08
阅读次数:
92
E70JHCOV2H-eyJsaWNlbnNlSWQiOiJFNzBKSENPVjJIIiwibGljZW5zZWVOYW1lIjoi5bGx5Lic55CG5bel5aSn5a2mIiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2V ...
分类:
其他好文 时间:
2020-07-07 15:32:40
阅读次数:
58
Introduction The Downlink Shared Channel (DL-SCH) is described in TS36.212, Section 5.3.2. This example demonstrates how a transmitter retransmits a s ...
分类:
其他好文 时间:
2020-07-05 19:12:43
阅读次数:
86