IBM Interview Question

Rearrange and insert into an array.