NeetCode #817LC-769MediumGreedy
← Back to All Problems

#817 · #769 · Max Chunks To Make Sorted(最多能完成排序的块)

📌 Problem Statement & Constraints

You are given an array arr that is a permutation of 0 .. n-1. Split the array into some number of contiguous chunks and sort each chunk individually. Return the maximum number of chunks that makes the whole array sorted. Constraints: 1 <= arr.length <= 10, arr is a permutation of 0 .. n-1.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!