Company: Morgan stanley_12may
Difficulty: medium
Remove Groups for Strictly Ascending Data Problem Description A weather-tracking dashboard stores one measurement per year for N years, indexed 0 through N-1. A new reporting rule says the displayed sequence of measurements must be strictly ascending — every value strictly greater than the one before it, with no ties allowed. To satisfy the rule, the team may delete the measurements belonging to a single block of consecutive years, leaving the rest of the years' data in place. After that one deletion, the values that remain (read in their original order) must already be strictly ascending. Count how many different blocks of consecutive years could be chosen for this single deletion so that the rule ends up satisfied. Write an algorithm that returns this count. Input The first line of the input consists of an integer - yearData_Size , representing the number of years for which data displayed in the application (N). The second line consists of N space-separated integers representing the