MayStreet interview question

sort the object data in C++