C++ || INTUITION
\nThis one was hard nailed it in 5 minutes >>>Power to u man\n\n\nclass Solution {\n\npublic:\n    int maxChunksToSorted(vector<int>& arr) {\n        int n=arr.
```\nThis one was hard nailed it in 5 minutes >>>Power to u man\n\n\nclass Solution {\n\npublic:\n    int maxChunksToSorted(vector<int>& arr) {\n        int n=arr.size();  \n     vector<int> rmin(n+1);  //rightmin array of size+1\n        rmin[n]=INT_MAX;\n        for(int i=n-1;i>=0;i--){\n            rmin[i]=min(arr[i],rmin[i+1]);  // prepare the rightmina array\n            \n        }\n        int lmax=INT_MIN;\n        int chunk=0;\n        for(int  i=0;i<n;i++){\n            lmax=max(arr[i],lmax); //keep updating lmax array\n            if(lmax<=rmin[i+1]){\n                chunk++;           //  here u increment  my chunks \n            }\n        }\n        return chunk;\n    }\n};\n\n```
['C++']