In Time Tec interview question

Array manipulation, sorting