Skip to content

Commit 386be21

Browse files
author
lucifer
committed
feat: 电子书
1 parent 86abd0c commit 386be21

20 files changed

+519
-429
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.DS_Store
2-
.idea/*
2+
_book/
3+
.idea/*
4+
node_modules/

91/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 91 天学算法
2+
3+
- [第一期讲义-二分法](.binary-search.md)
4+
- [第一期讲义-双指针](./two-pointers.md)
5+
- [第二期](.season2.md)

SUMMARY.md

Lines changed: 215 additions & 213 deletions
Large diffs are not rendered by default.

book.epub

19.4 MB
Binary file not shown.

book.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"structure": {
33
"readme": "introduction.md"
44
},
5+
"language": "zh-hans"
56

6-
"plugins": ["page-toc"]
77
}

book.mobi

23.1 MB
Binary file not shown.

book.pdf

48.2 MB
Binary file not shown.

introduction.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# LeetCode
22

3-
[![Travis](https://img.shields.io/badge/language-C++-green.svg)]()
4-
[![Travis](https://img.shields.io/badge/language-JavaScript-yellow.svg)]()
5-
[![Travis](https://img.shields.io/badge/language-Python-red.svg)]()
6-
[![Travis](https://img.shields.io/badge/language-Java-blue.svg)]()
7-
8-
[![](https://img.shields.io/badge/WeChat-微信群-brightgreen)](#关注我)
9-
[![](https://img.shields.io/badge/公众号-力扣加加-blueviolet)](#关注我)
10-
[![](https://img.shields.io/badge/Juejin-掘金-blue)](https://juejin.im/user/58af98305c497d0067780b3b)
11-
[![](https://img.shields.io/badge/Zhihu-知乎-blue)](https://www.zhihu.com/people/lu-xiao-13-70)
12-
[![](https://img.shields.io/badge/bilili-哔哩哔哩-ff69b4)](https://space.bilibili.com/519510412/)
13-
143
简体中文 | [English](./README.en.md)
154

165
---
@@ -26,6 +15,14 @@
2615

2716
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghluemaoj3j30z90dtmy5.jpg)
2817

18+
## 前言
19+
20+
这是我将我的所有公开的算法资料整理的一个电子书,主要特点有:
21+
22+
- 全部题目信息中文化,以前会有一些英文描述。
23+
24+
后期可能将每日一题也整理进来。
25+
2926
## 介绍
3027

3128
leetcode 题解,记录自己的 leetcode 解题之路。
@@ -66,6 +63,7 @@ leetcode 题解,记录自己的 leetcode 解题之路。
6663

6764
## 食用指南
6865

66+
- 我对题目难度进行了分类的保留,因此你可以根据自己的情况刷。我推荐大家从简单开始,逐步加大难度,直到困难。
6967
- 这里有一张互联网公司面试中经常考察的问题类型总结的思维导图,我们可以结合图片中的信息分析一下。
7068

7169
![leetcode-zhihu](https://tva1.sinaimg.cn/large/007S8ZIlly1ghluennxvrj30k00jx0te.jpg)

problems/1.two-sum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 题目地址
1+
## 题目地址(1. 两数之和)
22

33
https://leetcode-cn.com/problems/two-sum
44

problems/104.maximum-depth-of-binary-tree.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
## 题目地址
1+
## 题目地址(104. 二叉树的最大深度)
22

3-
https://leetcode.com/problems/maximum-depth-of-binary-tree/description/
3+
https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/description/
44

55
## 题目描述
66

77
```
8-
Given a binary tree, find its maximum depth.
8+
给定一个二叉树,找出其最大深度。
99
10-
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
10+
二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。
1111
12-
Note: A leaf is a node with no children.
12+
说明: 叶子节点是指没有子节点的节点。
1313
14-
Example:
15-
16-
Given binary tree [3,9,20,null,null,15,7],
14+
示例:
15+
给定二叉树 [3,9,20,null,null,15,7],
1716
1817
3
1918
/ \
2019
9 20
2120
/ \
2221
15 7
23-
return its depth = 3.
22+
返回它的最大深度 3 。
2423
2524
```
2625

@@ -45,7 +44,7 @@ return its depth = 3.
4544
用递归实现的代码如下:
4645

4746
```js
48-
var maxDepth = function(root) {
47+
var maxDepth = function (root) {
4948
if (!root) return 0;
5049
if (!root.left && !root.right) return 1;
5150
return 1 + Math.max(maxDepth(root.left), maxDepth(root.right));
@@ -64,9 +63,11 @@ var maxDepth = function(root) {
6463
- 树的基本操作- 遍历 - 层次遍历(BFS)
6564

6665
## 代码
67-
* 语言支持:JS,C++,Python
66+
67+
- 语言支持:JS,C++,Python
6868

6969
JavaScript Code:
70+
7071
```js
7172
/*
7273
* @lc app=leetcode id=104 lang=javascript
@@ -84,7 +85,7 @@ JavaScript Code:
8485
* @param {TreeNode} root
8586
* @return {number}
8687
*/
87-
var maxDepth = function(root) {
88+
var maxDepth = function (root) {
8889
if (!root) return 0;
8990
if (!root.left && !root.right) return 1;
9091

@@ -111,7 +112,9 @@ var maxDepth = function(root) {
111112
return depth;
112113
};
113114
```
115+
114116
C++ Code:
117+
115118
```C++
116119
/**
117120
* Definition for a binary tree node.
@@ -147,6 +150,7 @@ public:
147150
```
148151
149152
Python Code:
153+
150154
```python
151155
class Solution:
152156
def maxDepth(self, root: TreeNode) -> int:
@@ -164,16 +168,17 @@ class Solution:
164168
```
165169

166170
**复杂度分析**
171+
167172
- 时间复杂度:$O(N)$
168173
- 空间复杂度:$O(N)$
169174

170175
## 相关题目
176+
171177
- [102.binary-tree-level-order-traversal](./102.binary-tree-level-order-traversal.md)
172178
- [103.binary-tree-zigzag-level-order-traversal](./103.binary-tree-zigzag-level-order-traversal.md)
173179

174-
更多题解可以访问我的LeetCode题解仓库https://github.com/azl397985856/leetcode 。 目前已经35K star啦
180+
更多题解可以访问我的 LeetCode 题解仓库https://github.com/azl397985856/leetcode 。 目前已经 35K star 啦
175181

176182
关注公众号力扣加加,努力用清晰直白的语言还原解题思路,并且有大量图解,手把手教你识别套路,高效刷题。
177183

178-
179184
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfcuzagjalj30p00dwabs.jpg)

0 commit comments

Comments
 (0)