KBC Interview Question

in tray exercise