896. Monotonic Array

896. Monotonic Array 代碼 ##題目 代碼 代碼簡潔易懂,關鍵怎麼判斷數列判斷的單調性,直接使用第一個和最後一個比較: class Solution: def isMonotonic(self, A): """ :type A: List[int] :rtype: bool """ i
相關文章
相關標籤/搜索