Cognizant Interview Question

Questions on sorting