Skip to content

Instantly share code, notes, and snippets.

@whyrusleeping
Created January 22, 2013 23:34
Show Gist options
  • Save whyrusleeping/4599898 to your computer and use it in GitHub Desktop.
Save whyrusleeping/4599898 to your computer and use it in GitHub Desktop.
throwing up some code for later
package main
import "fmt"
import "math/rand"
func IsSorted(arr []int) bool {
for i := 1; i < len(arr); i++ {
if arr[i - 1] > arr[i] {
return false
}
}
return true
}
func MakeRandSplice(length int) []int {
arr := make([]int, length)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment