Compute Infection Time in a Grid | OpenAI Coding Question