Python Sliding Window
\nclass Solution(object):\n    def numSubarrayBoundedMax(self, A, L, R):\n        """\n        :type A: List[int]\n        :type L: int\n        :type R: int\n 
```\nclass Solution(object):\n    def numSubarrayBoundedMax(self, A, L, R):\n        """\n        :type A: List[int]\n        :type L: int\n        :type R: int\n        :rtype: int\n        """\n        # using Sliding window\n        windowStart = count = curr = 0\n        \n        for windowEnd, num in enumerate(A):\n            \n            if L <= num <= R:\n                curr = windowEnd - windowStart + 1\n            elif num > R:\n                curr = 0\n                windowStart = windowEnd + 1\n            \n            count += curr\n        \n        return count\n            \n```
['Sliding Window', 'Python']