2000
, and the elements could be up to10**8
.arr
of integers (not necessarily distinct), we split the array into some number of "chunks" (partitions), and individually sort each chunk. After concatenating them, the result equals the sorted array.arr
will have length in range[1, 2000]
.arr[i]
will be an integer in range[0, 10**8]
.