Infosys Interview Question

sorting an array and merging an array