Number of non-decreasing sub-arrays of length greater than or equal to K
Given an array arr[] of N elements and an integer K, the task is to find the number of non-decreasing sub-arrays of length greater than or equal to K.Examples: Input: arr[] = {1, 2, 3}, K = 2 Output: 3 {1, 2}, {2, 3} and {1, 2, 3} are the valid subarrays.Input: arr[] = {3, 2, 1}, K = 1 Output: 3 Nai