p
Size: a a a
p
IJ
IJ
IJ
M
А
СЛ
СЛ
DP
p
for(i:=0; i < n; i=i+1) begin?
arr[i] := 0;
end
А
for(i:=0; i < n; i=i+1) begin?
arr[i] := 0;
end
А
It's simple, all you need to do is iterate through the array, checking if its elements are in order. Any element that isn't in order you pull out, in other words, you send it to Gulag.
А
M
А
p
M
E