Max Chunks To Make Sorted (ver. 1)
Problem:
Given an array arr that is a permutation of [0, 1, …, arr.length...Example 1:
Input: arr = [4,3,2,1,0]
Output: 1
Explanation:
Splitting into two or more chunks...1]....]
for i in range(1, n - 1, 1):
maxs[i] = max(maxs[i - 1], arr[i])
for i...in range(1, n):
if (maxs[i - 1] <= mins[i]): ans += 1
return ans