Rearrange array to match each index with element value

mediumLast edited: January 2, 2025