Arcesium Interview Question

Java hacker rank link to solve two level sort using comparators