Number of Subarrays with Bounded Maximum || Simple Python Sliding Window
\nclass Solution:\n    def numSubarrayBoundedMax(self, nums: List[int], left: int, right: int) -> int:\n        windowStart=0\n        count=0\n        curr=0\n
```\nclass Solution:\n    def numSubarrayBoundedMax(self, nums: List[int], left: int, right: int) -> int:\n        windowStart=0\n        count=0\n        curr=0\n        \n        for windowEnd, num in enumerate(nums):\n            if left <= num <= right:\n                curr = windowEnd - windowStart + 1\n            elif num > right:\n                curr = 0\n                windowStart = windowEnd + 1\n            \n            count += curr\n        return count\n```
['Sliding Window', 'Python', 'Python3']