OpenAI·Machine Learning Engineer·Online Assessment (OA)
- Simulate an infectious disease spreading through a grid of plants. The first three parts follow a standard contagion model (matching problems described in other posts). In part four, a non-dead plant dies after D days if it has at least K infected neighbors at any moment, but if it has between T and K infected neighbors (T <= K), it instead enters a recovery countdown and recovers after D days. How do you model these competing state transitions correctly?
- Extending the simulation: starting from day 1, you can choose to burn one entire row or one entire column per day. Design a strategy to minimize the total number of dead plants by the end of the simulation.
“The first three parts were manageable since there are existing writeups floating around.”