Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```
- class Solution:
- def solve(self, nums):
- is_strictly_increasing = all(nums[i] < nums[i + 1] for i in range(len(nums) - 1))
- is_strictly_decreasing = all(nums[i] > nums[i + 1] for i in range(len(nums) - 1))
- return is_strictly_increasing or is_strictly_decreasing
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement