Last active
August 29, 2015 14:14
-
-
Save sagivo/9c8a7a97225c0a20355a to your computer and use it in GitHub Desktop.
sorting in go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "sort" | |
func main() { | |
arr := []int{2,4,3,1} | |
sort.Ints(arr) | |
fmt.Println(arr) // => [1,2,3,4] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment