
[LeetCode] 769. Max Chunks To Make Sorted (Python)
·
알고리즘/LeetCode
난이도: Medium문제 설명You are given an integer array arr of length n that represents a permutation of the integers in the range [0, n - 1]. We split arr into some number of chunks (i.e., partitions), and individually sort each chunk. After concatenating them, the result should equal the sorted array. Return the largest number of chunks we can make to sort the array. 문제 예제Example 1:Input: arr = [4,3,2,..