Chefling interview question

How did you approach the problem