Company: Morgan stanley_12may
Difficulty: medium
Remove Groups for Strictly Ascending Data Problem Description A software company receives a request to update an application as per the latest requirements. The application contains data for N years identified as 0 to N-1. As per the latest requirements, the analyst working on the update must analyse the data which is in strictly ascending order. This means that no two numbers can be the same in the data. The application must remove the data of groups of consecutive years such that the data of remaining years will be in strictly ascending order. Only one group can be removed. The analyst must find the number of groups that could be removed to fulfil the received requirement. Write an algorithm to find the number of groups that could be removed to fulfil the received requirement. 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 integer