Skip to content

Files

Latest commit

Zanger67/leetcodeZanger67/leetcode
Zanger67/leetcode
and
Zanger67/leetcode
Mar 16, 2025
03398f8 · Mar 16, 2025

History

History
42 lines (30 loc) · 966 Bytes

_2393. Count Strictly Increasing Subarrays.md

File metadata and controls

42 lines (30 loc) · 966 Bytes

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Back to top


First completed : July 29, 2024

Last updated : July 29, 2024


Related Topics : Array, Math, Dynamic Programming

Acceptance Rate : 71.23 %


Solutions

Python

class Solution:
    def countSubarrays(self, nums: List[int]) -> int:
        curr = []
        output = 0
        indx = 0

        for num in nums :
            if curr and curr[-1] >= num :
                curr = []
            curr.append(num)
            output += len(curr)
            indx += 1

        return output