Skip to content

Commit c91f1ad

Browse files
authored
Update 05_quicksort.php (egonSchiele#204)
1 parent 70d4d23 commit c91f1ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

04_quicksort/php/05_quicksort.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function quicksort(array $array) {
66
return $array;
77
} else {
88
// recursive case
9-
$pivot = $array[0];
9+
$pivot = $array[array_key_first($array)];
1010
var_dump($array);
1111

1212
// sub-array of all the elements less than the pivot

0 commit comments

Comments
 (0)