Fiserv interview question

OOPS concepts, Sorting