Skip to content

Commit a127a62

Browse files
committed
Removed fence mark in explanations.
1 parent 08fb407 commit a127a62

21 files changed

+0
-58
lines changed

en/1-1000/1-two-sum.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ You can return the answer in any order.
2020

2121
**Explanation**:
2222

23-
```
2423
Because nums[0] + nums[1] == 9, we return [0, 1].
25-
```
2624

2725
### [Example 2]
2826

en/1-1000/15-3sum.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ Notice that the solution set must not contain duplicate triplets.
1818

1919
**Explanation**:
2020

21-
```
2221
nums[0] + nums[1] + nums[2] = (-1) + 0 + 1 = 0.
2322
nums[1] + nums[2] + nums[4] = 0 + 1 + (-1) = 0.
2423
nums[0] + nums[3] + nums[4] = (-1) + 2 + (-1) = 0.
2524
The distinct triplets are [-1,0,1] and [-1,-1,2].
2625
Notice that the order of the output and the order of the triplets does not matter.
27-
```
2826

2927
### [Example 2]
3028

@@ -34,9 +32,7 @@ Notice that the order of the output and the order of the triplets does not matte
3432

3533
**Explanation**:
3634

37-
```
3835
The only possible triplet does not sum up to 0.
39-
```
4036

4137
### [Example 3]
4238

en/1-1000/202-happy-number.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ Return `true` if `n` is *a happy number*, and `false` if not.
2424

2525
**Explanation**:
2626

27-
```
2827
1^2 + 9^2 = 82
2928
8^2 + 2^2 = 68
3029
6^2 + 8^2 = 100
3130
1^2 + 0^2 + 0^2 = 1
32-
```
3331

3432
### [Example 2]
3533

en/1-1000/209-minimum-size-subarray-sum.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ Given an array of positive integers `nums` and a positive integer `target`, retu
1818

1919
**Explanation**:
2020

21-
```
2221
The subarray [4,3] has the minimal length under the problem constraint.
23-
```
2422

2523
### [Example 2]
2624

en/1-1000/27-remove-element.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ Consider the number of elements in `nums` which are not equal to `val` be `k`, t
2121

2222
**Explanation**:
2323

24-
```
2524
Your function should return k = 2, with the first two elements of nums being 2.
2625
It does not matter what you leave beyond the returned k (hence they are underscores).
27-
```
2826

2927
### [Example 2]
3028

@@ -34,11 +32,9 @@ It does not matter what you leave beyond the returned k (hence they are undersco
3432

3533
**Explanation**:
3634

37-
```
3835
Your function should return k = 5, with the first five elements of nums containing 0, 0, 1, 3, and 4.
3936
Note that the five elements can be returned in any order.
4037
It does not matter what you leave beyond the returned k (hence they are underscores).
41-
```
4238

4339
### [Constraints]
4440

en/1-1000/28-find-the-index-of-the-first-occurrence-in-a-string.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ Given two strings `needle` and `haystack`, return the **index** of the first occ
1616

1717
**Explanation**:
1818

19-
```
2019
"sad" occurs at index 0 and 6.
2120
The first occurrence is at index 0, so we return 0.
22-
```
2321

2422
### [Example 2]
2523

@@ -29,9 +27,7 @@ The first occurrence is at index 0, so we return 0.
2927

3028
**Explanation**:
3129

32-
```
3330
"leeto" did not occur in "leetcode", so we return -1.
34-
```
3531

3632
### [Constraints]
3733

en/1-1000/303-range-sum-query-immutable.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ Implement the `NumArray` class:
2323

2424
**Explanation**:
2525

26-
```
2726
NumArray numArray = new NumArray([-2, 0, 3, -5, 2, -1]);
2827
numArray.sumRange(0, 2); // return (-2) + 0 + 3 = 1
2928
numArray.sumRange(2, 5); // return 3 + (-5) + 2 + (-1) = -1
3029
numArray.sumRange(0, 5); // return (-2) + 0 + 3 + (-5) + 2 + (-1) = -3
31-
```
3230

3331
### [Constraints]
3432

en/1-1000/454-4sum-ii.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ Given four integer arrays `nums1`, `nums2`, `nums3`, and `nums4` all of length `
1919

2020
**Explanation**:
2121

22-
```
2322
The two tuples are:
2423

2524
1. (0, 0, 0, 1) -> nums1[0] + nums2[0] + nums3[0] + nums4[1] = 1 + (-2) + (-1) + 2 = 0
2625
2. (1, 1, 0, 0) -> nums1[1] + nums2[1] + nums3[0] + nums4[0] = 2 + (-1) + (-1) + 0 = 0
27-
```
2826

2927
### [Example 2]
3028

en/1-1000/707-design-linked-list.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ Implement the `MyLinkedList` class:
3030

3131
**Explanation**:
3232

33-
```
3433
MyLinkedList myLinkedList = new MyLinkedList();
3534
myLinkedList.addAtHead(1);
3635
myLinkedList.addAtTail(3);
3736
myLinkedList.addAtIndex(1, 2); // linked list becomes 1->2->3
3837
myLinkedList.get(1); // return 2
3938
myLinkedList.deleteAtIndex(1); // now the linked list is 1->3
4039
myLinkedList.get(1); // return 3
41-
```
4240

4341
### [Constraints]
4442

en/1-1000/833-find-and-replace-in-string.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ A **substring** is a contiguous sequence of characters in a string.
3434

3535
**Explanation**:
3636

37-
```
3837
"a" occurs at index 0 in s, so we replace it with "eee".
3938
"cd" occurs at index 2 in s, so we replace it with "ffff".
40-
```
4139

4240
### [Example 2]
4341

@@ -49,10 +47,8 @@ A **substring** is a contiguous sequence of characters in a string.
4947

5048
**Explanation**:
5149

52-
```
5350
"ab" occurs at index 0 in s, so we replace it with "eee".
5451
"ec" does not occur at index 2 in s, so we do nothing.
55-
```
5652

5753
### [Constraints]
5854

en/1-1000/977-squares-of-a-sorted-array.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ Given an integer array `nums` sorted in **non-decreasing** order, return *an arr
1818

1919
**Explanation**:
2020

21-
```
2221
After squaring, the array becomes [16,1,0,9,100].
2322
After sorting, it becomes [0,1,9,16,100].
24-
```
2523

2624
### [Example 2]
2725

en/3001-4000/3478-choose-k-elements-with-maximum-sum.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ Return an array `answer` of size `n`, where `answer[i]` represents the result fo
2323

2424
**Explanation**:
2525

26-
```
2726
- For `i = 0`: Select the 2 largest values from `nums2` at indices `[1, 2, 4]` where `nums1[j] < nums1[0]`, resulting in `50 + 30 = 80`.
2827
- For `i = 1`: Select the 2 largest values from `nums2` at index `[2]` where `nums1[j] < nums1[1]`, resulting in `30`.
2928
- For `i = 2`: No indices satisfy `nums1[j] < nums1[2]`, resulting in `0`.
3029
- For `i = 3`: Select the 2 largest values from `nums2` at indices `[0, 1, 2, 4]` where `nums1[j] < nums1[3]`, resulting in `50 + 30 = 80`.
3130
- For `i = 4`: Select the 2 largest values from `nums2` at indices `[1, 2]` where `nums1[j] < nums1[4]`, resulting in `30 + 20 = 50`.
32-
```
3331

3432
### [Example 2]
3533

@@ -39,9 +37,7 @@ Return an array `answer` of size `n`, where `answer[i]` represents the result fo
3937

4038
**Explanation**:
4139

42-
```
4340
Since all elements in `nums1` are equal, no indices satisfy the condition `nums1[j] < nums1[i]` for any `i`, resulting in `0` for all positions.
44-
```
4541

4642
### [Constraints]
4743

zh/1-1000/15-3sum.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@
1919

2020
**解释**:
2121

22-
```
2322
nums[0] + nums[1] + nums[2] = (-1) + 0 + 1 = 0 。
2423
nums[1] + nums[2] + nums[4] = 0 + 1 + (-1) = 0 。
2524
nums[0] + nums[3] + nums[4] = (-1) + 2 + (-1) = 0 。
2625
不同的三元组是 [-1,0,1][-1,-1,2]
2726
注意,输出的顺序和三元组的顺序并不重要。
28-
```
2927

3028
### [示例 2]
3129

zh/1-1000/202-happy-number.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@
2323

2424
**解释**:
2525

26-
```
2726
1^2 + 9^2 = 82
2827
8^2 + 2^2 = 68
2928
6^2 + 8^2 = 100
3029
1^2 + 0^2 + 0^2 = 1
31-
```
3230

3331
### [示例 2]
3432

zh/1-1000/27-remove-element.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121

2222
**解释**:
2323

24-
```
2524
你的函数函数应该返回 k = 2, 并且 nums 中的前两个元素均为 2。
2625
你在返回的 k 个元素之外留下了什么并不重要(因此它们并不计入评测)。
27-
```
2826

2927
### [示例 2]
3028

@@ -34,11 +32,9 @@
3432

3533
**解释**:
3634

37-
```
3835
你的函数应该返回 k = 5,并且 nums 中的前五个元素为 0,0,1,3,4。
3936
注意这五个元素可以任意顺序返回。
4037
你在返回的 k 个元素之外留下了什么并不重要(因此它们并不计入评测)。
41-
```
4238

4339
### [约束]
4440

zh/1-1000/303-range-sum-query-immutable.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@
2222

2323
**解释**:
2424

25-
```
2625
NumArray numArray = new NumArray([-2, 0, 3, -5, 2, -1]);
2726
numArray.sumRange(0, 2); // return (-2) + 0 + 3 = 1
2827
numArray.sumRange(2, 5); // return 3 + (-5) + 2 + (-1) = -1
2928
numArray.sumRange(0, 5); // return (-2) + 0 + 3 + (-5) + 2 + (-1) = -3
30-
```
3129

3230
### [约束]
3331

zh/1-1000/454-4sum-ii.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@
1919

2020
**解释**:
2121

22-
```
2322
两个元组如下:
2423

2524
1. (0, 0, 0, 1) -> nums1[0] + nums2[0] + nums3[0] + nums4[1] = 1 + (-2) + (-1) + 2 = 0
2625
2. (1, 1, 0, 0) -> nums1[1] + nums2[1] + nums3[0] + nums4[0] = 2 + (-1) + (-1) + 0 = 0
27-
```
2826

2927
### [示例 2]
3028

zh/1-1000/707-design-linked-list.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,13 @@
2929

3030
**解释**:
3131

32-
```
3332
MyLinkedList myLinkedList = new MyLinkedList();
3433
myLinkedList.addAtHead(1);
3534
myLinkedList.addAtTail(3);
3635
myLinkedList.addAtIndex(1, 2); // 链表变为 1->2->3
3736
myLinkedList.get(1); // 返回 2
3837
myLinkedList.deleteAtIndex(1); // 现在,链表变为 1->3
3938
myLinkedList.get(1); // 返回 3
40-
```
4139

4240
### [约束]
4341

zh/1-1000/833-find-and-replace-in-string.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@
3434

3535
**解释**:
3636

37-
```
3837
"a" 从 s 中的索引 0 开始,所以它被替换为 "eee"。
3938
"cd" 从 s 中的索引 2 开始,所以它被替换为 "ffff"。
40-
```
4139

4240
### [示例 2]
4341

@@ -49,10 +47,8 @@
4947

5048
**解释**:
5149

52-
```
5350
"ab" 从 s 中的索引 0 开始,所以它被替换为 "eee"。
5451
"ec" 没有从原始的 S 中的索引 2 开始,所以它没有被替换。
55-
```
5652

5753
### [约束]
5854

zh/1-1000/977-squares-of-a-sorted-array.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818

1919
**解释**:
2020

21-
```
2221
平方后,数组变为 [16,1,0,9,100]
2322
排序后,数组变为 [0,1,9,16,100]
24-
```
2523

2624
### [示例 2]
2725

zh/3001-4000/3478-choose-k-elements-with-maximum-sum.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@
2424

2525
**解释**:
2626

27-
```
2827
- 对于 `i = 0` :满足 `nums1[j] < nums1[0]` 的下标为 `[1, 2, 4]` ,选出其中值最大的两个,结果为 `50 + 30 = 80`
2928
- 对于 `i = 1` :满足 `nums1[j] < nums1[1]` 的下标为 `[2]` ,只能选择这个值,结果为 `30`
3029
- 对于 `i = 2` :不存在满足 `nums1[j] < nums1[2]` 的下标,结果为 `0`
3130
- 对于 `i = 3` :满足 `nums1[j] < nums1[3]` 的下标为 `[0, 1, 2, 4]` ,选出其中值最大的两个,结果为 `50 + 30 = 80`
3231
- 对于 `i = 4` :满足 `nums1[j] < nums1[4]` 的下标为 `[1, 2]` ,选出其中值最大的两个,结果为 `30 + 20 = 50`
33-
```
3432

3533
### [示例 2]
3634

@@ -40,9 +38,7 @@
4038

4139
**解释**:
4240

43-
```
4441
由于 `nums1` 中的所有元素相等,不存在满足条件 `nums1[j] < nums1[i]`,所有位置的结果都是 `0`
45-
```
4642

4743
### [约束]
4844

0 commit comments

Comments
 (0)