Skip to content

Commit dacd845

Browse files
committed
fix typo/syntax error
1 parent 30f9b4a commit dacd845

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

en/basics_sorting/quick_sort.md

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

33
In essence, quick sort is an application of `divide and conquer` strategy. There are usually three steps:
44

5-
Step1. Pick a pivot -- a random element.
6-
Step2. Partition -- put the elements smaller than pivot to its left and greater ones to its right.
7-
Step3. Recurse -- apply above steps until the whole sequence is sorted.
5+
1. Pick a pivot -- a random element.
6+
2. Partition -- put the elements smaller than pivot to its left and greater ones to its right.
7+
3. Recurse -- apply above steps until the whole sequence is sorted.
88

99
## out-in-place implementation
1010

@@ -286,7 +286,7 @@ The output:
286286
Having analyzed three implementations of quick sort, we may grasp one key difference between *quick sort* and *merge sort* :
287287

288288
1. Merge sort divides the original array into two sub-arrays, and merges the sorted sub-arrays to form a totally ordered one. In this case, recursion happens before processing(merging) the whole array.
289-
2. Quick sort divides the original array into two sub-arrays, and then sort them. The whole array is ordered as soon as the sub-arrays get sorted. In this case, recursion happens after processing(partition) the whole array.
289+
2. Quick sort divides the original array into two sub-arrays, and then sort them. The whole array is sorted as soon as the sub-arrays get sorted. In this case, recursion happens after processing(partition) the whole array.
290290

291291
Robert Sedgewick's presentation on [quick sort](http://algs4.cs.princeton.edu/23quicksort/) is strongly recommended.
292292

en/integer_array/partition_array_by_odd_and_even.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ Be careful not to forget `left < right` in while loop condition.
7272
7373
### Complexity
7474
75-
To traverse the array, time complexity is $$O(n)$$. And maintain two pointers mean $$O(1)$$ space complexity.
75+
To traverse the array, time complexity is $$O(n)$$. And maintaining two pointers means $$O(1)$$ space complexity.

en/linked_list/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ Frequently made mistakes:
88
- Not recording head node before traversing
99
- returning incorrect pointer to node
1010

11-
The image below serves as a summarization.
11+
The image below serves as a summarization of problems in this section.
1212

1313
![Linked List](../../shared-files/images/linked_list_summary_en.png)

0 commit comments

Comments
 (0)