Java Solution, 1 ms, Beats 100%
Code\n\nclass Solution {\n    public int findLengthOfShortestSubarray(int[] arr) {\n        int firstLast=0,lastFirst=arr.length-1;\n        for(;firstLast<arr.
# Code\n```\nclass Solution {\n    public int findLengthOfShortestSubarray(int[] arr) {\n        int firstLast=0,lastFirst=arr.length-1;\n        for(;firstLast<arr.length-1;firstLast++){\n            if(arr[firstLast]>arr[firstLast+1]) break;\n        }\n\t\t//Base case for a non-decreasing sequence\n        if(firstLast==arr.length-1) return 0;\n        for( ;lastFirst>0;lastFirst--){\n            if(arr[lastFirst]<arr[lastFirst-1]) break;\n        }\n\t\t//Possibilities 1 or 2 as mentioned above\n        int minLength=Math.min(arr.length-firstLast-1,lastFirst);\n        for(;firstLast>=0;firstLast--){\n            for(int i=lastFirst;i<arr.length;i++){\n                if(arr[firstLast]>arr[i]) continue;\n                minLength = Math.min(minLength,i-firstLast-1);\n                break;\n            }\n        }\n        return minLength;\n    }\n}\n```
['Array', 'Two Pointers', 'Binary Search', 'Stack', 'Java']