diff --git a/docs/notes/10.1 斐波那契数列.md b/docs/notes/10.1 斐波那契数列.md index 58b902e7..2d4326fe 100644 --- a/docs/notes/10.1 斐波那契数列.md +++ b/docs/notes/10.1 斐波那契数列.md @@ -1,5 +1,7 @@ # 10.1 斐波那契数列 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/c6c7742f5ba7442aada113136ddea0c3?tpId=13&tqId=11160&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 @@ -8,7 +10,7 @@ -

+

## 解题思路 diff --git a/docs/notes/10.2 矩形覆盖.md b/docs/notes/10.2 矩形覆盖.md index 14bae890..ecc7a646 100644 --- a/docs/notes/10.2 矩形覆盖.md +++ b/docs/notes/10.2 矩形覆盖.md @@ -1,5 +1,7 @@ # 10.2 矩形覆盖 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/72a5a919508a4251859fb2cfb987a0e6?tpId=13&tqId=11163&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 @@ -22,7 +24,7 @@ -

+

```java public int RectCover(int n) { diff --git a/docs/notes/10.3 跳台阶.md b/docs/notes/10.3 跳台阶.md index 007b43cb..bd89c6fd 100644 --- a/docs/notes/10.3 跳台阶.md +++ b/docs/notes/10.3 跳台阶.md @@ -1,5 +1,7 @@ # 10.3 跳台阶 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/8c82a5b80378478f9484d87d1c5f12a4?tpId=13&tqId=11161&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/docs/notes/10.4 变态跳台阶.md b/docs/notes/10.4 变态跳台阶.md index 94e59de4..0e779d00 100644 --- a/docs/notes/10.4 变态跳台阶.md +++ b/docs/notes/10.4 变态跳台阶.md @@ -1,5 +1,7 @@ # 10.4 变态跳台阶 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/22243d016f6b47f2a6928b4313c85387?tpId=13&tqId=11162&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/docs/notes/60. n 个骰子的点数.md b/docs/notes/60. n 个骰子的点数.md index 19cdc5ef..d298cc9a 100644 --- a/docs/notes/60. n 个骰子的点数.md +++ b/docs/notes/60. n 个骰子的点数.md @@ -1,5 +1,7 @@ # 60. n 个骰子的点数 +## 题目链接 + [Lintcode](https://www.lintcode.com/en/problem/dices-sum/) ## 题目描述 @@ -12,7 +14,7 @@ ### 动态规划 -使用一个二维数组 dp 存储点数出现的次数,其中 dp[i][j] 表示前 i 个骰子产生点数 j 的次数。 +使用一个二维数组 dp 存储点数出现的次数,其中 dp\[i]\[j] 表示前 i 个骰子产生点数 j 的次数。 空间复杂度:O(N2) diff --git a/docs/notes/61. 扑克牌顺子.md b/docs/notes/61. 扑克牌顺子.md index ec8fe105..9fde275c 100644 --- a/docs/notes/61. 扑克牌顺子.md +++ b/docs/notes/61. 扑克牌顺子.md @@ -1,5 +1,7 @@ # 61. 扑克牌顺子 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/762836f4d43d43ca9deb273b3de8e1f4?tpId=13&tqId=11198&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/docs/notes/62. 圆圈中最后剩下的数.md b/docs/notes/62. 圆圈中最后剩下的数.md index 6ee0a326..e99e8486 100644 --- a/docs/notes/62. 圆圈中最后剩下的数.md +++ b/docs/notes/62. 圆圈中最后剩下的数.md @@ -1,5 +1,7 @@ # 62. 圆圈中最后剩下的数 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/f78a359491e64a50bce2d89cff857eb6?tpId=13&tqId=11199&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/docs/notes/63. 股票的最大利润.md b/docs/notes/63. 股票的最大利润.md index 025fd251..499319a5 100644 --- a/docs/notes/63. 股票的最大利润.md +++ b/docs/notes/63. 股票的最大利润.md @@ -1,6 +1,8 @@ # 63. 股票的最大利润 -[Leetcode](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/) +## 题目链接 + +[Leetcode:121. Best Time to Buy and Sell Stock ](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/) ## 题目描述 diff --git a/docs/notes/64. 求 1+2+3+...+n.md b/docs/notes/64. 求 1+2+3+...+n.md index b5e3f246..77cc5303 100644 --- a/docs/notes/64. 求 1+2+3+...+n.md +++ b/docs/notes/64. 求 1+2+3+...+n.md @@ -1,5 +1,7 @@ # 64. 求 1+2+3+...+n +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/7a0da8fc483247ff8800059e12d7caf1?tpId=13&tqId=11200&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/docs/notes/65. 不用加减乘除做加法.md b/docs/notes/65. 不用加减乘除做加法.md index 58ec4cba..1afc5427 100644 --- a/docs/notes/65. 不用加减乘除做加法.md +++ b/docs/notes/65. 不用加减乘除做加法.md @@ -1,5 +1,7 @@ # 65. 不用加减乘除做加法 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/59ac416b4b944300b617d4f7f111b215?tpId=13&tqId=11201&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/docs/notes/66. 构建乘积数组.md b/docs/notes/66. 构建乘积数组.md index e6da04ce..8317ca2a 100644 --- a/docs/notes/66. 构建乘积数组.md +++ b/docs/notes/66. 构建乘积数组.md @@ -1,5 +1,7 @@ # 66. 构建乘积数组 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/94a4d381a68b47b7a8bed86f2975db46?tpId=13&tqId=11204&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/docs/notes/67. 把字符串转换成整数.md b/docs/notes/67. 把字符串转换成整数.md index f46b587b..db736fa8 100644 --- a/docs/notes/67. 把字符串转换成整数.md +++ b/docs/notes/67. 把字符串转换成整数.md @@ -1,5 +1,7 @@ # 67. 把字符串转换成整数 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/1277c681251b4372bdef344468e4f26e?tpId=13&tqId=11202&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/docs/notes/9. 用两个栈实现队列.md b/docs/notes/9. 用两个栈实现队列.md index f1ba5259..7d1f24ec 100644 --- a/docs/notes/9. 用两个栈实现队列.md +++ b/docs/notes/9. 用两个栈实现队列.md @@ -12,7 +12,7 @@ in 栈用来处理入栈(push)操作,out 栈用来处理出栈(pop)操作。一个元素进入 in 栈之后,出栈的顺序被反转。当元素要出栈时,需要先进入 out 栈,此时元素出栈顺序再一次被反转,因此出栈顺序就和最开始入栈顺序是相同的,先进入的元素先退出,这就是队列的顺序。 -

+

```java Stack in = new Stack(); diff --git a/notes/10.1 斐波那契数列.md b/notes/10.1 斐波那契数列.md index 58b902e7..2d4326fe 100644 --- a/notes/10.1 斐波那契数列.md +++ b/notes/10.1 斐波那契数列.md @@ -1,5 +1,7 @@ # 10.1 斐波那契数列 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/c6c7742f5ba7442aada113136ddea0c3?tpId=13&tqId=11160&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 @@ -8,7 +10,7 @@ -

+

## 解题思路 diff --git a/notes/10.2 矩形覆盖.md b/notes/10.2 矩形覆盖.md index 14bae890..ecc7a646 100644 --- a/notes/10.2 矩形覆盖.md +++ b/notes/10.2 矩形覆盖.md @@ -1,5 +1,7 @@ # 10.2 矩形覆盖 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/72a5a919508a4251859fb2cfb987a0e6?tpId=13&tqId=11163&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 @@ -22,7 +24,7 @@ -

+

```java public int RectCover(int n) { diff --git a/notes/10.3 跳台阶.md b/notes/10.3 跳台阶.md index 007b43cb..bd89c6fd 100644 --- a/notes/10.3 跳台阶.md +++ b/notes/10.3 跳台阶.md @@ -1,5 +1,7 @@ # 10.3 跳台阶 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/8c82a5b80378478f9484d87d1c5f12a4?tpId=13&tqId=11161&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/notes/10.4 变态跳台阶.md b/notes/10.4 变态跳台阶.md index 94e59de4..0e779d00 100644 --- a/notes/10.4 变态跳台阶.md +++ b/notes/10.4 变态跳台阶.md @@ -1,5 +1,7 @@ # 10.4 变态跳台阶 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/22243d016f6b47f2a6928b4313c85387?tpId=13&tqId=11162&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/notes/60. n 个骰子的点数.md b/notes/60. n 个骰子的点数.md index 19cdc5ef..d298cc9a 100644 --- a/notes/60. n 个骰子的点数.md +++ b/notes/60. n 个骰子的点数.md @@ -1,5 +1,7 @@ # 60. n 个骰子的点数 +## 题目链接 + [Lintcode](https://www.lintcode.com/en/problem/dices-sum/) ## 题目描述 @@ -12,7 +14,7 @@ ### 动态规划 -使用一个二维数组 dp 存储点数出现的次数,其中 dp[i][j] 表示前 i 个骰子产生点数 j 的次数。 +使用一个二维数组 dp 存储点数出现的次数,其中 dp\[i]\[j] 表示前 i 个骰子产生点数 j 的次数。 空间复杂度:O(N2) diff --git a/notes/61. 扑克牌顺子.md b/notes/61. 扑克牌顺子.md index ec8fe105..9fde275c 100644 --- a/notes/61. 扑克牌顺子.md +++ b/notes/61. 扑克牌顺子.md @@ -1,5 +1,7 @@ # 61. 扑克牌顺子 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/762836f4d43d43ca9deb273b3de8e1f4?tpId=13&tqId=11198&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/notes/62. 圆圈中最后剩下的数.md b/notes/62. 圆圈中最后剩下的数.md index 6ee0a326..e99e8486 100644 --- a/notes/62. 圆圈中最后剩下的数.md +++ b/notes/62. 圆圈中最后剩下的数.md @@ -1,5 +1,7 @@ # 62. 圆圈中最后剩下的数 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/f78a359491e64a50bce2d89cff857eb6?tpId=13&tqId=11199&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/notes/63. 股票的最大利润.md b/notes/63. 股票的最大利润.md index 025fd251..499319a5 100644 --- a/notes/63. 股票的最大利润.md +++ b/notes/63. 股票的最大利润.md @@ -1,6 +1,8 @@ # 63. 股票的最大利润 -[Leetcode](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/) +## 题目链接 + +[Leetcode:121. Best Time to Buy and Sell Stock ](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/) ## 题目描述 diff --git a/notes/64. 求 1+2+3+...+n.md b/notes/64. 求 1+2+3+...+n.md index b5e3f246..77cc5303 100644 --- a/notes/64. 求 1+2+3+...+n.md +++ b/notes/64. 求 1+2+3+...+n.md @@ -1,5 +1,7 @@ # 64. 求 1+2+3+...+n +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/7a0da8fc483247ff8800059e12d7caf1?tpId=13&tqId=11200&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/notes/65. 不用加减乘除做加法.md b/notes/65. 不用加减乘除做加法.md index 58ec4cba..1afc5427 100644 --- a/notes/65. 不用加减乘除做加法.md +++ b/notes/65. 不用加减乘除做加法.md @@ -1,5 +1,7 @@ # 65. 不用加减乘除做加法 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/59ac416b4b944300b617d4f7f111b215?tpId=13&tqId=11201&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/notes/66. 构建乘积数组.md b/notes/66. 构建乘积数组.md index e6da04ce..8317ca2a 100644 --- a/notes/66. 构建乘积数组.md +++ b/notes/66. 构建乘积数组.md @@ -1,5 +1,7 @@ # 66. 构建乘积数组 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/94a4d381a68b47b7a8bed86f2975db46?tpId=13&tqId=11204&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/notes/67. 把字符串转换成整数.md b/notes/67. 把字符串转换成整数.md index f46b587b..db736fa8 100644 --- a/notes/67. 把字符串转换成整数.md +++ b/notes/67. 把字符串转换成整数.md @@ -1,5 +1,7 @@ # 67. 把字符串转换成整数 +## 题目链接 + [NowCoder](https://www.nowcoder.com/practice/1277c681251b4372bdef344468e4f26e?tpId=13&tqId=11202&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 diff --git a/notes/9. 用两个栈实现队列.md b/notes/9. 用两个栈实现队列.md index f1ba5259..7d1f24ec 100644 --- a/notes/9. 用两个栈实现队列.md +++ b/notes/9. 用两个栈实现队列.md @@ -12,7 +12,7 @@ in 栈用来处理入栈(push)操作,out 栈用来处理出栈(pop)操作。一个元素进入 in 栈之后,出栈的顺序被反转。当元素要出栈时,需要先进入 out 栈,此时元素出栈顺序再一次被反转,因此出栈顺序就和最开始入栈顺序是相同的,先进入的元素先退出,这就是队列的顺序。 -

+

```java Stack in = new Stack();