Beats 100%🔥|| easy JAVA Solution✅
Code\n\nclass Solution {\n    public int maxChunksToSorted(int[] arr) {\n        int n=arr.length;\n        int min[]=new int[n];\n        min[n-1]=arr[n-1];\n 
# Code\n```\nclass Solution {\n    public int maxChunksToSorted(int[] arr) {\n        int n=arr.length;\n        int min[]=new int[n];\n        min[n-1]=arr[n-1];\n        for(int i=n-2;i>=0;i--){\n            min[i]=Math.min(min[i+1],arr[i]);\n        }\n        int ans=0,max=Integer.MIN_VALUE;\n        for(int i=0;i<n-1;i++){\n            max=Math.max(max,arr[i]);\n            if(max<=min[i+1]) ans++;\n        }\n        return ans+1;\n    }\n}\n```
['Java']