Skip to content

Commit 00c2a65

Browse files
author
lucifer
committed
fix: 电子书问题修复
1 parent 5d1d27a commit 00c2a65

18 files changed

+156
-65
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
_book/
33
.idea/*
44
node_modules/
5-
book.pdf
6-
book.mobi
7-
book.epub
8-
book.zip
5+
book*.pdf
6+
book*.mobi
7+
book*.epub
8+
book*.zip

SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
* [第一章 - 算法专题](thinkings/README.md)
77
* [数据结构](thinkings/basic-data-structure.md)
8-
* [基础算法](thinkings/basic-algorithm.md)
98
* [二叉树的遍历](thinkings/binary-tree-traversal.md)
109
* [动态规划](thinkings/dynamic-programming.md)
1110
* [哈夫曼编码和游程编码](thinkings/run-length-encode-and-huffman-encode.md)

problems/4.median-of-two-sorted-arrays.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Java Code:
119119

120120
_解法一 - 暴力解法(Brute force)_
121121

122-
```java []
122+
```java
123123
class MedianTwoSortedArrayBruteForce {
124124
public double findMedianSortedArrays(int[] nums1, int[] nums2) {
125125
int[] newArr = mergeTwoSortedArray(nums1, nums2);
@@ -157,7 +157,7 @@ class MedianTwoSortedArrayBruteForce {
157157
}
158158
```
159159

160-
```javascript []
160+
```javascript
161161
/**
162162
* @param {number[]} nums1
163163
* @param {number[]} nums2
@@ -196,7 +196,7 @@ var findMedianSortedArrays = function (nums1, nums2) {
196196

197197
_解法二 - 二分查找(Binary Search)_
198198

199-
```js []
199+
```js
200200
/**
201201
* 二分解法
202202
* @param {number[]} nums1
@@ -234,7 +234,7 @@ var findMedianSortedArrays = function (nums1, nums2) {
234234
};
235235
```
236236

237-
```java []
237+
```java
238238
class MedianSortedTwoArrayBinarySearch {
239239
public static double findMedianSortedArraysBinarySearch(int[] nums1, int[] nums2) {
240240
// do binary search for shorter length array, make sure time complexity log(min(m,n)).
@@ -285,6 +285,5 @@ class MedianSortedTwoArrayBinarySearch {
285285

286286
大家对此有何看法,欢迎给我留言,我有时间都会一一查看回答。更多算法套路可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 37K star 啦。
287287
大家也可以关注我的公众号《力扣加加》带你啃下算法这块硬骨头。
288-
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfcuzagjalj30p00dwabs.jpg)
289288

290-
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltzedtodj31bi0hcq5s.jpg)
289+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfcuzagjalj30p00dwabs.jpg)

problems/40.combination-sum-ii.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,7 @@ class Solution:
142142
- [90.subsets-ii](./90.subsets-ii.md)
143143
- [113.path-sum-ii](./113.path-sum-ii.md)
144144
- [131.palindrome-partitioning](./131.palindrome-partitioning.md)
145+
146+
大家对此有何看法,欢迎给我留言,我有时间都会一一查看回答。更多算法套路可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 37K star 啦。
147+
大家也可以关注我的公众号《力扣加加》带你啃下算法这块硬骨头。
148+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfcuzagjalj30p00dwabs.jpg)

problems/52.N-Queens-II.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,7 @@ const totalNQueens = function (n) {
9696

9797
- 时间复杂度:O(N!)
9898
- 空间复杂度:O(N)
99+
100+
大家对此有何看法,欢迎给我留言,我有时间都会一一查看回答。更多算法套路可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 37K star 啦。
101+
大家也可以关注我的公众号《力扣加加》带你啃下算法这块硬骨头。
102+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfcuzagjalj30p00dwabs.jpg)

problems/53.maximum-sum-subarray-cn.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ https://leetcode-cn.com/problems/maximum-subarray/
3333
- linkedin
3434
- microsoft
3535

36-
## 公司
37-
38-
- 阿里、百度、字节、腾讯
39-
4036
## 思路
4137

4238
这道题求解连续最大子序列和,以下从时间复杂度角度分析不同的解题思路。

problems/56.merge-intervals.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,7 @@ class Solution:
120120

121121
- 时间复杂度:由于采用了排序,因此复杂度大概为 $O(NlogN)$
122122
- 空间复杂度:$O(N)$
123+
124+
大家对此有何看法,欢迎给我留言,我有时间都会一一查看回答。更多算法套路可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 37K star 啦。
125+
大家也可以关注我的公众号《力扣加加》带你啃下算法这块硬骨头。
126+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfcuzagjalj30p00dwabs.jpg)

problems/63.unique-paths-ii.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,7 @@ class Solution:
161161

162162
- [70. 爬楼梯](https://leetcode-cn.com/problems/climbing-stairs/)
163163
- [62. 不同路径](./62.unique-paths.md)
164+
165+
大家对此有何看法,欢迎给我留言,我有时间都会一一查看回答。更多算法套路可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 37K star 啦。
166+
大家也可以关注我的公众号《力扣加加》带你啃下算法这块硬骨头。
167+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfcuzagjalj30p00dwabs.jpg)

problems/78.subsets.md

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -66,41 +66,6 @@ https://leetcode-cn.com/problems/subsets/
6666
JavaScript Code:
6767

6868
```js
69-
/*
70-
* @lc app=leetcode id=78 lang=javascript
71-
*
72-
* [78] Subsets
73-
*
74-
* https://leetcode.com/problems/subsets/description/
75-
*
76-
* algorithms
77-
* Medium (51.19%)
78-
* Total Accepted: 351.6K
79-
* Total Submissions: 674.8K
80-
* Testcase Example: '[1,2,3]'
81-
*
82-
* Given a set of distinct integers, nums, return all possible subsets (the
83-
* power set).
84-
*
85-
* Note: The solution set must not contain duplicate subsets.
86-
*
87-
* Example:
88-
*
89-
*
90-
* Input: nums = [1,2,3]
91-
* Output:
92-
* [
93-
* ⁠ [3],
94-
* [1],
95-
* [2],
96-
* [1,2,3],
97-
* [1,3],
98-
* [2,3],
99-
* [1,2],
100-
* []
101-
* ]
102-
*
103-
*/
10469
function backtrack(list, tempList, nums, start) {
10570
list.push([...tempList]);
10671
for (let i = start; i < nums.length; i++) {
@@ -152,3 +117,7 @@ public:
152117
- [90.subsets-ii](./90.subsets-ii.md)
153118
- [113.path-sum-ii](./113.path-sum-ii.md)
154119
- [131.palindrome-partitioning](./131.palindrome-partitioning.md)
120+
121+
大家对此有何看法,欢迎给我留言,我有时间都会一一查看回答。更多算法套路可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 37K star 啦。
122+
大家也可以关注我的公众号《力扣加加》带你啃下算法这块硬骨头。
123+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfcuzagjalj30p00dwabs.jpg)

problems/79.word-search.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,3 +279,7 @@ var exist = function (board, word) {
279279
## 参考(References)
280280

281281
1. [回溯法 Wiki](https://www.wikiwand.com/zh/%E5%9B%9E%E6%BA%AF%E6%B3%95)
282+
283+
大家对此有何看法,欢迎给我留言,我有时间都会一一查看回答。更多算法套路可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 37K star 啦。
284+
大家也可以关注我的公众号《力扣加加》带你啃下算法这块硬骨头。
285+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfcuzagjalj30p00dwabs.jpg)

0 commit comments

Comments
 (0)