C++  Two Pointer approach
\nint findLengthOfShortestSubarray(vector<int>& arr) {\n        int i = 0;\n        int j = arr.size() - 1;\n        int n = arr.size();\n        \n        whil
```\nint findLengthOfShortestSubarray(vector<int>& arr) {\n        int i = 0;\n        int j = arr.size() - 1;\n        int n = arr.size();\n        \n        while (i < j && arr[i] <= arr[i+1]) i++;\n        if (i + 1 == n) return 0; // Always increasing array\n        while( j > i && arr[j] >= arr[j-1]) j--;\n        \n        int left = 0;\n        int right = j;\n        int ret = min(n-1-i, j);\n        while(left <= i && right < n){\n            if(arr[left] <= arr[right]){\n                ret = min(ret, right-left-1);\n                left++;\n            }\n            else right++;\n        }\n        return ret;       \n    }\n```
['Two Pointers', 'C', 'C++']