Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Try to separate the elements at odd indices from the elements at even indices.
Sort the two groups of elements individually.
Combine them to form the resultant array.