Given array of elements where , transform it into sorted order. Each operation: pick index and set .
Constraints: . Use at most operations.
MEX is the minimum non-negative integer not in the array.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
CF 1375D - transform array using MEX operations
Given array of elements where , transform it into sorted order. Each operation: pick index and set .
Constraints: . Use at most operations.
MEX is the minimum non-negative integer not in the array.