We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fbe4ce commit a14dd67Copy full SHA for a14dd67
topics/go/algorithms/sorting/heap/heap.go
@@ -38,7 +38,7 @@ func HeapSort(list []int) []int {
38
// swap: [<3> 1 1 1] [4 6 7 7]
39
// swap: [1 1 1] [3 4 6 7 7]
40
// swap: [1 1] [1 3 4 6 7 7]
41
- // done: [1 1 1 3 4 6 7 7]
+ // done: [1 1 1 3 4 6 7 7]
42
size := len(list)
43
for index := size - 1; index >= 1; index-- {
44
list[0], list[index] = list[index], list[0]
0 commit comments