Count subarrays where second highest lie before highest
Problem Statement The problem “Count subarrays where second highest lie before highest” states that you are given an array a[ ] of size n where n is greater than or equal to 2. Count the total number of subarrays in which the index of highest element of the subarray is …