package main /** * * @param prices int整型一维数组 * @return int整型 */ func maxProfit( prices []int ) int { // write code here min := prices[0] max := 0 for _, d := range prices { min = Min(min, d) max = Max(max, d - min) } return max } func Max(x, y int) int { if x > y { return x...