Skip to content

Commit 44109ca

Browse files
committed
lint(quick_sort): fix formatting
1 parent 128c153 commit 44109ca

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/sorting/quick_sort.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
/// QuickSort is a Divide and Conquer algorithm. It picks an element as
2-
/// a pivot and partitions the given array around the picked pivot.
3-
/// There are many different versions of quickSort that pick pivot in different ways.
2+
/// a pivot and partitions the given array around the picked pivot.
3+
/// There are many different versions of quickSort that pick pivot in different ways.
44
/// parameters takes an array
5-
/// The key process in quickSort is a partition().
6-
/// The target of partitions is, given an array and an element x of an array as the pivot,
7-
/// put x at its correct position in a sorted array and put all smaller elements (smaller than x) before x,
5+
/// The key process in quickSort is a partition().
6+
/// The target of partitions is, given an array and an element x of an array as the pivot,
7+
/// put x at its correct position in a sorted array and put all smaller elements (smaller than x) before x,
88
/// and put all greater elements (greater than x) after x. All this should be done in linear time.
99
/// Quicksort's time complexity is O(n*logn) .
1010
11-
1211
pub fn quick_sort<T: Ord>(array: &mut [T]) {
1312
match array.len() {
1413
0 | 1 => return,

0 commit comments

Comments
 (0)