Tap here to switch tabs
Problem
Submissions

Problem: Count the Number of Incremovable Subarrays I

med
30 min
Try to solve the Count the Number of Incremovable Subarrays I problem.

Statement

You are given a 00 indexed array of positive integers nums.

A subarray of nums is called incremovable if the remaining elements of nums are strictly increasing after removing the subarray.

Return the total count of incremovable subarrays in nums.

Note: An empty remaining array is considered strictly increasing. The removed subarray must be non empty.

Constraints:

  • 1≤1 \leq nums.length ≤50\leq 50

  • 1≤1 \leq nums[i] ≤50\leq 50

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count the Number of Incremovable Subarrays I

med
30 min
Try to solve the Count the Number of Incremovable Subarrays I problem.

Statement

You are given a 00 indexed array of positive integers nums.

A subarray of nums is called incremovable if the remaining elements of nums are strictly increasing after removing the subarray.

Return the total count of incremovable subarrays in nums.

Note: An empty remaining array is considered strictly increasing. The removed subarray must be non empty.

Constraints:

  • 1≤1 \leq nums.length ≤50\leq 50

  • 1≤1 \leq nums[i] ≤50\leq 50