Skip to content

Commit 564d152

Browse files
committed
udpate new questions
1 parent 750bb36 commit 564d152

21 files changed

Lines changed: 249 additions & 68 deletions

File tree

images/017_Telephone-keypad2.png

24.8 KB
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
**17. 电话号码的字母组合**
2+
---
3+
[https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/](https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/)
4+
5+
给定一个仅包含数字 2-9 的字符串,返回所有它能表示的字母组合。
6+
7+
给出数字到字母的映射如下(与电话按键相同)。注意 1 不对应任何字母。
8+
![017_Telephone-keypad2](https://raw.githubusercontent.com/hollischuang/algorithm/master/images/017_Telephone-keypad2.png)
9+
10+
**示例:**
11+
12+
```
13+
输入:"23"
14+
输出:["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"].
15+
```
16+
17+
**说明:**
18+
尽管上面的答案是按字典序排列的,但是你可以任意选择答案输出的顺序。
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
**64. 最小路径和**
2+
---
3+
[https://leetcode-cn.com/problems/minimum-path-sum/](https://leetcode-cn.com/problems/minimum-path-sum/)
4+
5+
给定一个包含非负整数的 m x n 网格,请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。
6+
7+
说明:每次只能向下或者向右移动一步。
8+
9+
**示例:**
10+
11+
```
12+
输入:
13+
[
14+
[1,3,1],
15+
[1,5,1],
16+
[4,2,1]
17+
]
18+
输出: 7
19+
解释: 因为路径 1→3→1→1→1 的总和最小。
20+
```

leetcode/064-minimumPathSum/official.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
**70. 爬楼梯**
2+
---
3+
[https://leetcode-cn.com/problems/climbing-stairs/](https://leetcode-cn.com/problems/climbing-stairs/)
4+
5+
假设你正在爬楼梯。需要 n 阶你才能到达楼顶。
6+
7+
每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢?
8+
9+
注意:给定 n 是一个正整数。
10+
11+
**示例 1:**
12+
13+
```
14+
输入: 2
15+
输出: 2
16+
解释: 有两种方法可以爬到楼顶。
17+
1. 1 阶 + 1 阶
18+
2. 2 阶
19+
```
20+
21+
**示例 2:**
22+
23+
```
24+
输入: 3
25+
输出: 3
26+
解释: 有三种方法可以爬到楼顶。
27+
1. 1 阶 + 1 阶 + 1 阶
28+
2. 1 阶 + 2 阶
29+
3. 2 阶 + 1 阶
30+
```

leetcode/070-ClimbingStairs/official.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
**279. 完全平方数**
2+
---
3+
[https://leetcode-cn.com/problems/perfect-squares/](https://leetcode-cn.com/problems/perfect-squares/)
4+
5+
给定正整数 n,找到若干个完全平方数(比如 1, 4, 9, 16, ...)使得它们的和等于 n。你需要让组成和的完全平方数的个数最少。
6+
7+
**示例 1:**
8+
9+
```
10+
输入: n = 12
11+
输出: 3
12+
解释: 12 = 4 + 4 + 4.
13+
```
14+
15+
**示例 2:**
16+
17+
```
18+
输入: n = 13
19+
输出: 2
20+
解释: 13 = 4 + 9.
21+
```

leetcode/279-PerfectSquares/official.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
**300. 最长上升子序列**
2+
---
3+
[https://leetcode-cn.com/problems/longest-increasing-subsequence/](https://leetcode-cn.com/problems/longest-increasing-subsequence/)
4+
5+
给定一个无序的整数数组,找到其中最长上升子序列的长度。
6+
7+
**示例:**
8+
9+
```
10+
输入: [10,9,2,5,3,7,101,18]
11+
输出: 4
12+
解释: 最长的上升子序列是 [2,3,7,101],它的长度是 4。
13+
```
14+
15+
**说明:**
16+
17+
* 可能会有多种最长上升子序列的组合,你只需要输出对应的长度即可
18+
* 你算法的时间复杂度应该为 O(n2)
19+
20+
**进阶:**
21+
你能将算法的时间复杂度降低到 O(n log n) 吗?
22+

leetcode/300-LongestIncreasingSubsequence/official.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)