Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
#SmileBASIC, 67 bytes
DEF I(A)DIM B[0]FOR I=1TO LEN(A)PUSH B,I NEXT SORT A,B RETURN B END
Very simple, all it does is generate a list of numbers from 1 to (length of array) and sort this by the same order as the input.