luoheng
8/10/2019 - 12:55 PM

最小值

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
}