2393. Count Strictly Increasing Subarrays
On This Page
class Solution:
def countSubarrays(self, nums: List[int]) -> int:
res = pre = cnt = 0
for x in nums:
if pre < x:
cnt += 1
else:
cnt = 1
pre = x
res += cnt
return res