题目:
题解:
func thirdMax(nums []int) int {var a, b, c *intfor _, num := range nums {num := numif a == nil || num > *a {a, b, c = &num, a, b} else if *a > num && (b == nil || num > *b) {b, c = &num, b} else if b != nil && *b > num && (c == nil || num > *c) {c = &num}}if c == nil {return *a}return *c
}