#SmileBASIC, 79 bytes DEF S A FOR Z=0TO I FOR I=1TO LEN(A)-1SWAP A[I-(A[I-1]>A[I])],A[I]NEXT NEXT END
12Me21
- 6.7k
- 1
- 22
- 40