Skip to content

Instantly share code, notes, and snippets.

@luoheng23
Created August 10, 2019 12:55
Show Gist options
  • Save luoheng23/97f361ae17c1b72cbec8f811de4919cf to your computer and use it in GitHub Desktop.
Save luoheng23/97f361ae17c1b72cbec8f811de4919cf to your computer and use it in GitHub Desktop.
func Min(A []int) int {
if len(A) < 1 {
return 0
}
min := A[0]
for _, a := range A {
if a < min {
min = a
}
}
return min
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment