You are given an integer array arr.
You need to partition arr into the maximum number of contiguous chunks such that sorting each chunk individually and then concatenating them in order results in a completely sorted array.
Return the maximum number of chunks that can be formed.
Constraints:
arr.length
arr[i]
You are given an integer array arr.
You need to partition arr into the maximum number of contiguous chunks such that sorting each chunk individually and then concatenating them in order results in a completely sorted array.
Return the maximum number of chunks that can be formed.
Constraints:
arr.length
arr[i]