In Time Tec interview question

data structure