Itlize Global interview question

Bus ticket booking system, sorting-related coding problem.