In Time Tec Interview Question

they asked to solve cricket strike change problem