最佳答案
考虑数组 [1,2,3,4]
。如何将数组项重新排列到新位置。
例如:
put 3 into position 4 [1,2,4,3]
put 4 in to position 1 [4,1,2,3]
put 2 into position 3 [1,3,2,4]
.