simple solution
\nclass Solution {\npublic:\n    int findLengthOfShortestSubarray(vector<int>&v) {\n        int sz=v.size();\n        if(sz<2)\n          return 0;\n        int
```\nclass Solution {\npublic:\n    int findLengthOfShortestSubarray(vector<int>&v) {\n        int sz=v.size();\n        if(sz<2)\n          return 0;\n        int i,j,res=sz;\n        for(i=0;i<sz-1;++i){\n          if(v[i]>v[i+1])\n            break;\n        }\n        if(i==sz-1)\n          return 0;\n        for(j=sz-1;j>0;--j){\n          if(v[j]<v[j-1])\n            break;\n        }\n        for(int k=0;k<=i;++k){\n        int dis=lower_bound(v.begin()+j,v.end(),v[k])-v.begin()-k-1;\n        res=min(res,dis);\n        }\n        return min(min(res,sz-i-1),j);\n    }\n};\n```
['Binary Tree', 'Iterator']