Smallest Subarray to be Sorted to make the whole array sorted
Given an unsorted array arr[]. Find the subarray arr[s...e] such that sorting this subarray makes the whole array sorted.Note: If the given array is already sorted then return [0, 0].Examples:Input: arr[] = [10, 12, 20, 30, 25, 40, 32, 31, 35, 50, 60]Output: [3, 8]Explanation: Sorting subarray start