HCL Interview Question

Sorting the given list of arrays