Company: Airtel_24sep
Difficulty: medium
Operate the Subarray Problem Description You are given an array A consisting of N positive numbers. In one operation, you can take any subarray of the array and replace it with its sum. You can perform this operation any number of times. Your task is to print a number that denotes the maximum length of the non-decreasing array after performing the above operations. For example: If A = [1, 2, 6, 9], you can choose the subarray [2,6] and replace it with its sum we get A = [1, 8, 9]. Therefore in 1 operation, the array can be made Non-decreasing. Input format: The input consists of two lines: The first line will contain an integer N. The second line contains N space-separated integers denoting the array elements. The input will be read from the STDIN by the candidate. Output format: Print a number that denotes the maximum length of the non-decreasing array after performing the above operations. The output will be matched to the candidate's output printed on the STDOUT. Examples Example 1: