Jump to content

Sort an integer array: Difference between revisions

added Go
(added Go)
Line 237:
! a = array to be sorted
! b = array of indices of a. b(1) 'points' to the minimum value etc.</lang>
 
=={{header|Go}}==
<lang go>package main
import "fmt"
import "sort"
 
func main() {
nums := []int {2, 4, 3, 1, 2}
sort.SortInts(nums)
fmt.Println(nums)
}</lang>
 
=={{header|Groovy}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.