Given an array arr[], find the maximum j - i such that arr[i] <= arr[j]
Given an array arr[] of n positive integers, the task is to find the maximum of j - i subjected to the constraint of arr[i] <= arr[j] and i <= j. Examples : Input: arr[] = [34, 8, 10, 3, 2, 80, 30, 33, 1]Output: 6 Explanation: for i = 1 and j = 7. Input: arr[] = [1, 2, 3, 4, 5, 6]Output: 5 Exp