Domanda di colloquio di Coupang

Dynamic programming question, related to bacteria survival.