Sort an integer array: Difference between revisions
Content added Content deleted
(added Go) |
|||
Line 237: | Line 237: | ||
! a = array to be sorted |
! a = array to be sorted |
||
! b = array of indices of a. b(1) 'points' to the minimum value etc.</lang> |
! 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}}== |
=={{header|Groovy}}== |