Created
January 22, 2013 23:34
-
-
Save whyrusleeping/4599898 to your computer and use it in GitHub Desktop.
throwing up some code for later
This file contains hidden or 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
| 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