Skip to content

Commit a26459b

Browse files
committed
naming update
1 parent b6b7905 commit a26459b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sorts/quicksort.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
//Package sorts a package for demonstrating sorting algorithms in Go
22
package sorts
33

4-
func Quicksort(array []int) {
4+
func QuickSort(array []int)[]int {
55
if len(array) <= 1 {
6-
return
6+
return array
77
}
88
q := partition(array)
9-
Quicksort(array[:q])
10-
Quicksort(array[q+1:])
9+
QuickSort(array[:q])
10+
QuickSort(array[q+1:])
11+
return array
1112
}
1213

1314
func partition(array []int) int {

0 commit comments

Comments
 (0)