Count of Subarrays whose first element is the minimum
Given an array arr[] of size N, the task is to find the number of subarrays whose first element is not greater than other elements of the subarray. Examples: Input: arr = {1, 2, 1}Output: 5Explanation: All subarray are: {1}, {1, 2}, {1, 2, 1}, {2}, {2, 1}, {1}From above subarray the following meets