Skip to content

Commit 0a7a956

Browse files
authored
Update QuickSort.js
1 parent d7c5561 commit 0a7a956

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

SortingAlgorithms/QuickSort.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
var items = [5,3,7,6,2,9];
21
function swap(items, leftIndex, rightIndex){
32
var temp = items[leftIndex];
43
items[leftIndex] = items[rightIndex];
@@ -37,6 +36,4 @@ function quickSort(items, left, right) {
3736
}
3837
return items;
3938
}
40-
// first call to quick sort
41-
var sortedArray = quickSort(items, 0, items.length - 1);
42-
console.log(sortedArray); //prints [2,3,5,6,7,9]
39+

0 commit comments

Comments
 (0)