Skip to content

Commit

Permalink
feat:替换英文 (azl397985856#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
yulecc authored Oct 17, 2020
1 parent 68b70da commit 3a0b5d1
Show file tree
Hide file tree
Showing 136 changed files with 1,842 additions and 1,425 deletions.
319 changes: 159 additions & 160 deletions SUMMARY.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## 题目地址(1011. 在 D 天内送达包裹的能力)

https://leetcode-cn.com/problems/capacity-to-ship-packages-within-d-days
https://leetcode-cn.com/problems/capacity-to-ship-packages-within-d-days/

## 题目描述

```
传送带上的包裹必须在 D 天内从一个港口运送到另一个港口。
传送带上的第 i  个包裹的重量为  weights[i]。每一天,我们都会按给出重量的顺序往传送带上装载包裹。我们装载的重量不会超过船的最大运载重量。
Expand Down Expand Up @@ -47,6 +49,8 @@ https://leetcode-cn.com/problems/capacity-to-ship-packages-within-d-days
1 <= D <= weights.length <= 50000
1 <= weights[i] <= 500
```

## 前置知识

- 二分法
Expand Down
6 changes: 5 additions & 1 deletion problems/1014.best-sightseeing-pair.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## 题目地址(1014. 最佳观光组合)

https://leetcode-cn.com/problems/best-sightseeing-pair/description/
https://leetcode-cn.com/problems/best-sightseeing-pair/

## 题目描述

```
给定正整数数组  A,A[i]  表示第 i 个观光景点的评分,并且两个景点  i 和  j  之间的距离为  j - i。
一对景点(i < j)组成的观光组合的得分为(A[i] + A[j] + i - j):景点的评分之和减去它们两者之间的距离。
Expand All @@ -21,6 +23,8 @@ https://leetcode-cn.com/problems/best-sightseeing-pair/description/
2 <= A.length <= 50000
1 <= A[i] <= 1000
```

## 前置知识

- 动态规划
Expand Down
4 changes: 2 additions & 2 deletions problems/1015.smallest-integer-divisible-by-k.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 题目地址
## 题目地址(1015. 可被 K 整除的最小整数)

https://leetcode-cn.com/problems/smallest-integer-divisible-by-k/description/
https://leetcode-cn.com/problems/smallest-integer-divisible-by-k/

## 题目描述

Expand Down
4 changes: 2 additions & 2 deletions problems/1019.next-greater-node-in-linked-list.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 题目地址
## 题目地址(1019. 链表中的下一个更大节点)

https://leetcode-cn.com/problems/next-greater-node-in-linked-list/submissions/
https://leetcode-cn.com/problems/next-greater-node-in-linked-list/

## 题目描述

Expand Down
4 changes: 2 additions & 2 deletions problems/102.binary-tree-level-order-traversal.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

## 题目地址
https://leetcode.com/problems/binary-tree-level-order-traversal/description/
## 题目地址(102. 二叉树的层序遍历)
https://leetcode-cn.com/problems/binary-tree-level-order-traversal/

## 题目描述
```
Expand Down
2 changes: 1 addition & 1 deletion problems/1020.number-of-enclaves.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 题目地址
## 题目地址(1020. 飞地的数量)

https://leetcode-cn.com/problems/number-of-enclaves/

Expand Down
2 changes: 1 addition & 1 deletion problems/1023.camelcase-matching.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 题目地址
## 题目地址(1023. 驼峰式匹配)

https://leetcode-cn.com/problems/camelcase-matching/

Expand Down
15 changes: 9 additions & 6 deletions problems/103.binary-tree-zigzag-level-order-traversal.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@

## 题目地址
https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/description/
## 题目地址(103. 二叉树的锯齿形层次遍历)
https://leetcode-cn.com/problems/binary-tree-zigzag-level-order-traversal/

## 题目描述
和leetcode 102 基本是一样的,思路是完全一样的。

```
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
给定一个二叉树,返回其节点值的锯齿形层次遍历。(即先从左往右,再从右往左进行下一层遍历,以此类推,层与层之间交替进行)。
例如:
给定二叉树 [3,9,20,null,null,15,7],
For example:
Given binary tree [3,9,20,null,null,15,7],
3
/ \
9 20
/ \
15 7
return its zigzag level order traversal as:
返回锯齿形层次遍历如下:
[
[3],
[20,9],
[15,7]
]
```

## 前置知识
Expand Down
43 changes: 23 additions & 20 deletions problems/1031.maximum-sum-of-two-non-overlapping-subarrays.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
## 题目地址
https://leetcode.com/problems/maximum-sum-of-two-non-overlapping-subarrays/
## 题目地址(1031. 两个非重叠子数组的最大和)
https://leetcode-cn.com/problems/maximum-sum-of-two-non-overlapping-subarrays/

## 题目描述

```
Given an array A of non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous) subarrays, which have lengths L and M. (For clarification, the L-length subarray could occur before or after the M-length subarray.)
给出非负整数数组 A ,返回两个非重叠(连续)子数组中元素的最大和,子数组的长度分别为 L 和 M。(这里需要澄清的是,长为 L 的子数组可以出现在长为 M 的子数组之前或之后。)
Formally, return the largest V for which V = (A[i] + A[i+1] + ... + A[i+L-1]) + (A[j] + A[j+1] + ... + A[j+M-1]) and either:
从形式上看,返回最大的 V,而 V = (A[i] + A[i+1] + ... + A[i+L-1]) + (A[j] + A[j+1] + ... + A[j+M-1]) 并满足下列条件之一:
0 <= i < i + L - 1 < j < j + M - 1 < A.length, or
 
0 <= i < i + L - 1 < j < j + M - 1 < A.length, 或
0 <= j < j + M - 1 < i < i + L - 1 < A.length.
 
Example 1:
示例 1:
Input: A = [0,6,5,2,2,5,1,9,4], L = 1, M = 2
Output: 20
Explanation: One choice of subarrays is [9] with length 1, and [6,5] with length 2.
Example 2:
输入:A = [0,6,5,2,2,5,1,9,4], L = 1, M = 2
输出:20
解释:子数组的一种选择中,[9] 长度为 1,[6,5] 长度为 2。
示例 2:
Input: A = [3,8,1,3,2,1,8,9,0], L = 3, M = 2
Output: 29
Explanation: One choice of subarrays is [3,8,1] with length 3, and [8,9] with length 2.
Example 3:
输入:A = [3,8,1,3,2,1,8,9,0], L = 3, M = 2
输出:29
解释:子数组的一种选择中,[3,8,1] 长度为 3,[8,9] 长度为 2。
示例 3:
Input: A = [2,1,5,6,0,9,5,0,3,8], L = 4, M = 3
Output: 31
Explanation: One choice of subarrays is [5,6,0,9] with length 4, and [3,8] with length 3.
输入:A = [2,1,5,6,0,9,5,0,3,8], L = 4, M = 3
输出:31
解释:子数组的一种选择中,[5,6,0,9] 长度为 4,[0,3,8] 长度为 3。
 
Note:
提示:
L >= 1
M >= 1
L + M <= A.length <= 1000
0 <= A[i] <= 1000
```

## 前置知识
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
## 问题地址/Problem URL
## 题目地址(105. 从前序与中序遍历序列构造二叉树)

https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/

## 问题介绍/Problem Description
## 题目描述

Given preorder and inorder traversal of a tree, construct the binary tree.
```
根据一棵树的前序遍历与中序遍历构造二叉树。
Note:
You may assume that duplicates do not exist in the tree.
注意:
你可以假设树中没有重复的元素。
For example, given
例如,给出
```java
preorder = [3,9,20,15,7]
inorder = [9,3,15,20,7]
```
前序遍历 preorder = [3,9,20,15,7]
中序遍历 inorder = [9,3,15,20,7]
返回如下的二叉树:
Return the following binary tree:

```bash
3
/ \
9 20
/ \
15 7
```

## 前置知识
Expand Down
2 changes: 1 addition & 1 deletion problems/11.container-with-most-water.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 题目地址
## 题目地址(11. 盛最多水的容器)

https://leetcode-cn.com/problems/container-with-most-water/description/

Expand Down
8 changes: 6 additions & 2 deletions problems/1104.path-in-zigzag-labelled-binary-tree.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## 题目地址
## 题目地址(1104. 二叉树寻路)

https://leetcode-cn.com/problems/path-in-zigzag-labelled-binary-tree/description/
https://leetcode-cn.com/problems/path-in-zigzag-labelled-binary-tree/

## 题目描述

```
在一棵无限的二叉树上,每个节点都有两个子节点,树中的节点 逐行 依次按 “之” 字形进行标记。
如下图所示,在奇数行(即,第一行、第三行、第五行……)中,按从左到右的顺序进行标记;
Expand All @@ -27,6 +29,8 @@ https://leetcode-cn.com/problems/path-in-zigzag-labelled-binary-tree/description
1 <= label <= 10^6
```

## 前置知识

- 二叉树
Expand Down
30 changes: 15 additions & 15 deletions problems/113.path-sum-ii.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
## 题目地址
https://leetcode.com/problems/path-sum-ii/description/
## 题目地址(113. 路径总和 II)
https://leetcode-cn.com/problems/path-sum-ii/

## 题目描述
```
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
给定一个二叉树和一个目标和,找到所有从根节点到叶子节点路径总和等于给定目标和的路径。
Note: A leaf is a node with no children.
说明: 叶子节点是指没有子节点的节点。
Example:
示例:
给定如下二叉树,以及目标和 sum = 22,
Given the below binary tree and sum = 22,
5
/ \
4 8
/ / \
11 13 4
/ \ / \
7 2 5 1
Return:
5
/ \
4 8
/ / \
11 13 4
/ \ / \
7 2 5 1
返回:
[
[5,4,11,2],
[5,8,4,5]
]
```

## 前置知识
Expand Down
6 changes: 5 additions & 1 deletion problems/1131.maximum-of-absolute-value-expression.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## 题目地址(1131. 绝对值表达式的最大值)

https://leetcode-cn.com/problems/maximum-of-absolute-value-expression/description/
https://leetcode-cn.com/problems/maximum-of-absolute-value-expression/

## 题目描述

```
给你两个长度相等的整数数组,返回下面表达式的最大值:
|arr1[i] - arr1[j]| + |arr2[i] - arr2[j]| + |i - j|
Expand All @@ -24,6 +26,8 @@ https://leetcode-cn.com/problems/maximum-of-absolute-value-expression/descriptio
2 <= arr1.length == arr2.length <= 40000
-10^6 <= arr1[i], arr2[i] <= 10^6
```

## 前置知识

- 数组
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
## 题目地址
## 题目地址(1168. 水资源分配优化)
https://leetcode.com/problems/optimize-water-distribution-in-a-village/

## 题目描述
```
There are n houses in a village. We want to supply water for all the houses by building wells and laying pipes.
村庄内有n户人家,我们可以通过挖井或者建造水管向每家供水。
For each house i, we can either build a well inside it directly with cost wells[i], or pipe in water from another well to it. The costs to lay pipes between houses are given by the array pipes, where each pipes[i] = [house1, house2, cost] represents the cost to connect house1 and house2 together using a pipe. Connections are bidirectional.
对于每户人家i,我们可以通过花费 wells[i] 直接在其房内挖水井,或者通过水管连接到其他的水井。每两户住户间铺设水管的费用通过 pipes 数组表示。 pipes[i] = [house1, house2, cost] 表示住户1到住户2间铺设水管的费用为cost。
Find the minimum total cost to supply water to all houses.
请求出所有住户都能通水的最小花费。
Example 1:
示例1:
Input: n = 3, wells = [1,2,2], pipes = [[1,2,1],[2,3,1]]
Output: 3
Explanation:
输入: n = 3, wells = [1,2,2], pipes = [[1,2,1],[2,3,1]]
输出: 3
解释:
The image shows the costs of connecting houses using pipes.
The best strategy is to build a well in the first house with cost 1 and connect the other houses to it with cost 2 so the total cost is 3.
Constraints:
提示:
1 <= n <= 10000
wells.length == n
Expand Down
4 changes: 2 additions & 2 deletions problems/1186.maximum-subarray-sum-with-one-deletion.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 题目地址
## 题目地址(1186. 删除一次得到子数组最大和)

https://leetcode.com/problems/maximum-subarray-sum-with-one-deletion/
https://leetcode-cn.com/problems/maximum-subarray-sum-with-one-deletion/

## 题目描述

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 题目地址
## 题目地址(1218. 最长定差子序列)

https://leetcode-cn.com/problems/longest-arithmetic-subsequence-of-given-difference/

Expand Down
2 changes: 1 addition & 1 deletion problems/1227.airplane-seat-assignment-probability.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 题目地址(1227. 飞机座位分配概率)

https://leetcode-cn.com/problems/airplane-seat-assignment-probability/description/
https://leetcode-cn.com/problems/airplane-seat-assignment-probability/

## 题目描述

Expand Down
Loading

0 comments on commit 3a0b5d1

Please sign in to comment.