<reponame>ProHiryu/leetcode<gh_stars>1-10
#
# @lc app=leetcode id=896 lang=python3
#
# [896] Monotonic Array
#

# @lc code=start
class Solution:
    def isMonotonic(self, A: List[int]) -> bool:
        B = sorted(A)
        return B == A or B == A[::-1]
# @lc code=end


#
# @lc app=leetcode id=896 lang=python3
#
# [896] Monotonic Array
#

# @lc code=start
class Solution:
    def isMonotonic(self, A: List[int]) -> bool:
        B = sorted(A)
        return B == A or B == A[::-1]
# @lc code=end
# # @lc app=leetcode id=896 lang=python3 # # [896] Monotonic Array # # @lc code=start # @lc code=end