Skip to content

Commit 2e834a7

Browse files
committed
style: format code and documents
1 parent 856a024 commit 2e834a7

File tree

573 files changed

+11955
-11698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

573 files changed

+11955
-11698
lines changed

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"useTabs": false,
44
"semi": true,
55
"singleQuote": true,
6-
"TrailingCooma": "all",
6+
"trailingComma": "all",
77
"bracketSpacing": true,
88
"jsxBracketSameLine": false,
99
"arrowParens": "avoid"

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
- Using welcoming and inclusive language
18-
- Being respectful of differing viewpoints and experiences
19-
- Gracefully accepting constructive criticism
20-
- Focusing on what is best for the community
21-
- Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
- The use of sexualized language or imagery and unwelcome sexual attention or
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
2626
advances
27-
- Trolling, insulting/derogatory comments, and personal or political attacks
28-
- Public or private harassment
29-
- Publishing others' private information, such as a physical or electronic
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
3030
address, without explicit permission
31-
- Other conduct which could reasonably be considered inappropriate in a
31+
- Other conduct which could reasonably be considered inappropriate in a
3232
professional setting
3333

3434
## Our Responsibilities

README.md

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

README_EN.md

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

basic/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## 排序算法
44

5-
- [冒泡排序](./sorting/BubbleSort/README.md)
6-
- [插入排序](./sorting/InsertionSort/README.md)
7-
- [选择排序](./sorting/SelectionSort/README.md)
8-
- [归并排序](./sorting/MergeSort/README.md)
9-
- [快速排序](./sorting/QuickSort/README.md)
10-
- [堆排序](./sorting/HeapSort/README.md)
5+
- [冒泡排序](./sorting/BubbleSort/README.md)
6+
- [插入排序](./sorting/InsertionSort/README.md)
7+
- [选择排序](./sorting/SelectionSort/README.md)
8+
- [归并排序](./sorting/MergeSort/README.md)
9+
- [快速排序](./sorting/QuickSort/README.md)
10+
- [堆排序](./sorting/HeapSort/README.md)
1111

1212
## 查找算法
1313

14-
- [二分查找](./searching/BinarySearch/README.md)
14+
- [二分查找](./searching/BinarySearch/README.md)

basic/README_EN.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Sorting
44

5-
- [Bubble Sort](./sorting/BubbleSort/README.md)
6-
- [Insertion Sort](./sorting/InsertionSort/README.md)
7-
- [Selection Sort](./sorting/SelectionSort/README.md)
8-
- [Merge Sort](./sorting/MergeSort/README.md)
9-
- [Quick Sort](./sorting/QuickSort/README.md)
10-
- [Shell Sort](./sorting/ShellSort/README.md)
11-
- [Heap Sort](./sorting/HeapSort/README.md)
5+
- [Bubble Sort](./sorting/BubbleSort/README.md)
6+
- [Insertion Sort](./sorting/InsertionSort/README.md)
7+
- [Selection Sort](./sorting/SelectionSort/README.md)
8+
- [Merge Sort](./sorting/MergeSort/README.md)
9+
- [Quick Sort](./sorting/QuickSort/README.md)
10+
- [Shell Sort](./sorting/ShellSort/README.md)
11+
- [Heap Sort](./sorting/HeapSort/README.md)
1212

1313
## Searching
1414

15-
- [Binary Search](./searching/BinarySearch/README.md)
15+
- [Binary Search](./searching/BinarySearch/README.md)

basic/searching/BinarySearch/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ int search(int left, int right) {
5353

5454
## 例题
5555

56-
- [在排序数组中查找元素的第一个和最后一个位置](/solution/0000-0099/0034.Find%20First%20and%20Last%20Position%20of%20Element%20in%20Sorted%20Array/README.md)
57-
- [x 的平方根](/solution/0000-0099/0069.Sqrt%28x%29/README.md)
58-
- [寻找峰值](/solution/0100-0199/0162.Find%20Peak%20Element/README.md)
59-
- [第一个错误的版本](/solution/0200-0299/0278.First%20Bad%20Version/README.md)
60-
- [不动点](/solution/1000-1099/1064.Fixed%20Point/README.md)
56+
- [在排序数组中查找元素的第一个和最后一个位置](/solution/0000-0099/0034.Find%20First%20and%20Last%20Position%20of%20Element%20in%20Sorted%20Array/README.md)
57+
- [x 的平方根](/solution/0000-0099/0069.Sqrt%28x%29/README.md)
58+
- [寻找峰值](/solution/0100-0199/0162.Find%20Peak%20Element/README.md)
59+
- [第一个错误的版本](/solution/0200-0299/0278.First%20Bad%20Version/README.md)
60+
- [不动点](/solution/1000-1099/1064.Fixed%20Point/README.md)

basic/searching/BinarySearch/README_EN.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ int search(int left, int right) {
4040

4141
## Examples
4242

43-
- [Find First and Last Position of Element in Sorted Array](/solution/0000-0099/0034.Find%20First%20and%20Last%20Position%20of%20Element%20in%20Sorted%20Array/README_EN.md)
44-
- [Sqrt(x)](/solution/0000-0099/0069.Sqrt%28x%29/README_EN.md)
45-
- [Find Peak Element](/solution/0100-0199/0162.Find%20Peak%20Element/README_EN.md)
46-
- [First Bad Version](/solution/0200-0299/0278.First%20Bad%20Version/README_EN.md)
47-
- [Fixed Point](/solution/1000-1099/1064.Fixed%20Point/README_EN.md)
43+
- [Find First and Last Position of Element in Sorted Array](/solution/0000-0099/0034.Find%20First%20and%20Last%20Position%20of%20Element%20in%20Sorted%20Array/README_EN.md)
44+
- [Sqrt(x)](/solution/0000-0099/0069.Sqrt%28x%29/README_EN.md)
45+
- [Find Peak Element](/solution/0100-0199/0162.Find%20Peak%20Element/README_EN.md)
46+
- [First Bad Version](/solution/0200-0299/0278.First%20Bad%20Version/README_EN.md)
47+
- [Fixed Point](/solution/1000-1099/1064.Fixed%20Point/README_EN.md)

basic/sorting/HeapSort/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ for (int i = n / 2; i > 0; --i) {
5151

5252
**数据范围**
5353

54-
- 1 ≤ m ≤ n ≤ 10^5
55-
- 1 ≤ 数列中元素 ≤ 10^9
54+
- 1 ≤ m ≤ n ≤ 10^5
55+
- 1 ≤ 数列中元素 ≤ 10^9
5656

5757
**输入样例:**
5858

basic/sorting/InsertionSort/README.md

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

1111
与冒泡排序对比:
1212

13-
- 在冒泡排序中,经过每一轮的排序处理后,数组后端的数是排好序的。
14-
- 在插入排序中,经过每一轮的排序处理后,数组前端的数是排好序的。
13+
- 在冒泡排序中,经过每一轮的排序处理后,数组后端的数是排好序的。
14+
- 在插入排序中,经过每一轮的排序处理后,数组前端的数是排好序的。
1515

1616
## 代码示例
1717

0 commit comments

Comments
 (0)