Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution:
- def isMonotonic(self, A: List[int]) -> bool:
- return not {(i>j)-(i<j) for i, j in zip(A, A[1:])} >= {1, -1}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement