Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. func Max(A []int) int {
  2. if len(A) < 1 {
  3. return 0
  4. }
  5. max := A[0]
  6. for _, a := range A {
  7. if a > max {
  8. max = a
  9. }
  10. }
  11. return max
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement