| 1 | class Solution: |
| 2 | def isMonotonic(self, A: List[int]) -> bool: |
| 3 | #an array is monotonic if it is either increasing or decreasing, so we check if the array is equal to |
| 4 | #its sorted version in either descending order or ascending order. If yes return True |
| 5 | #else return False. |
| 6 | if A==sorted(A): |
| 7 | return True |
| 8 | if A==sorted(A,reverse=True): |
| 9 | return True |
| 10 | return False |
nothing calls this directly
no outgoing calls
no test coverage detected