解析由於nums[i]!=nums[i+1]而且nums[-1]=nums[n]=-∞;因此數組形狀必是一個或多個Λ。java
參考:https://discuss.leetcode.com/topic/5848/o-logn-solution-javacode數組
https://discuss.leetcode.com/topic/5724/find-the-maximum-by-binary-search-recursion-and-iterationcode