Problem Brief
Subarray Removal
OA
Given an array arr of n integers, find the number of its subarrays such that removing the subarray creates a non-empty array that is sorted in increasing order.
Note: A subarray is defined as any contiguous segment of the array.
1Example 1
Input
arr = [1, 2, 1, 2]
Output
7
Explanation

Constraints
Limits and guarantees your solution can rely on.
O_O