Saved from https://leetcode-cn.com/problems/peak-index-in-a-mountain-array/submissions/
func peakIndexInMountainArray(A []int) int { for i := 1; i < len(A); i++ { if A[i] > A[i+1] { return i } } return -1 }