Update 05_quicksort.php (#204)
This commit is contained in:
@@ -6,7 +6,7 @@ function quicksort(array $array) {
|
|||||||
return $array;
|
return $array;
|
||||||
} else {
|
} else {
|
||||||
// recursive case
|
// recursive case
|
||||||
$pivot = $array[0];
|
$pivot = $array[array_key_first($array)];
|
||||||
var_dump($array);
|
var_dump($array);
|
||||||
|
|
||||||
// sub-array of all the elements less than the pivot
|
// sub-array of all the elements less than the pivot
|
||||||
|
|||||||
Reference in New Issue
Block a user