Skip to content

Commit a8ce359

Browse files
committed
Add the partitioning function's names
1 parent 1e7bc06 commit a8ce359

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/sorting/quicksort-middle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* Partitions the array in two parts by the middle elements.
2020
* All elemnts which are less than the chosen one goes left from it
2121
* all which are greater goes right from it.
22+
* Uses Hoare's partitioning algorithm.
2223
*
2324
* @param {array} array Array which should be partitioned
2425
* @param {number} left Left part of the array

src/sorting/quicksort.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515

1616
/**
17-
* Partitions given subarray.
17+
* Partitions given subarray using Lomuto's partitioning algorithm.
1818
*
1919
* @private
2020
* @param {array} array Input array

0 commit comments

Comments
 (0)