Easy to understand O(N) Java Solution
In short we just need to confirm a new split when the smallest number on the right side for the current index is greater or equal to the current max number.\n\n
In short we just need to confirm a new split when the smallest number on the right side for the current index is greater or equal to the current max number.\n\n```\npublic int maxChunksToSorted(int[] arr) {\n        int []rightMin = new int[arr.length];\n        rightMin[arr.length - 1] = arr[arr.length - 1];\n        for (int i = arr.length - 2; i >= 0; i--) rightMin[i] = Math.min(rightMin[i+1], arr[i]);\n        int result = 0, max = 0;\n        for (int i = 0; i < arr.length; i++) {\n            max = Math.max(max, arr[i]);\n            if (i == arr.length - 1 || max <= rightMin[i+1]) result++;\n        }\n        return result;\n    }\n```
[]