# Infection spread simulation — interview question

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/6394/simulate-infection-spread-model
Source observed: 2026-11-05T00:11:38.372Z
Last checked: 2026-11-05T00:11:38.372+00:00
Indexed: 2026-11-06T20:55:14.824+00:00

---

# Infection spread simulation.

We publish this coding interview question for practicing data structures and algorithms. Given a grid, simulate the spread of a disease. Each cell is one of three values:

- `2`: infected
- `1`: healthy
- `0`: empty

During each round, infected cells spread the disease to adjacent healthy cells.

## Question details

- **Category:** [Data Structures & Algorithms](https://www.aced.io/questions?type=algorithms) and [Coding](https://www.aced.io/questions?type=coding)
- **Roles:** [Software Engineer](https://www.aced.io/questions?role=swe) — 2; [AI Engineer](https://www.aced.io/questions?role=ai-engineer)
- **Company:** [OpenAI](https://www.aced.io/questions?company=openai) — 3
- **Reported last asked:** 4 months ago
- **Interview experiences:** 2 shared

Detailed company statistics are available through [Upgrade](https://www.aced.io/upgrade?src=questions).

## Interview experiences

### OpenAI — Software Engineer, Senior / L5

[Read the full experience](https://www.aced.io/experiences/openai-senior-software-engineer-interview-facc04)

> “The process was short-lived for me, unfortunately. The coding interview was an hour long, and the question was similar to the game of life, but for an infection spreading across a 2D array. I approached it much too methodically - explaining my approach before implementing, like I've learned to do from past technical interviews. The thing about this one is that theres FIVE long parts, and you have to pass the test cases for each part before you move on to the next. If I could do it again I would be frantically coding from the very beginning - waste no time. Add print statements to debug. The interviewer doesn't help or guide much, its mostly on you.”

### OpenAI — Software Engineer, Senior / L5

[Read the full experience](https://www.aced.io/experiences/openai-senior-software-engineer-interview-dec425)

> “It was very rigorous but the recruiter was actually accurate and helpful about what to prepare, which is rare and I really appreciated that. The process consisted of a system design interview and a coding interview. The system design round focused on designing a payment processing system. The interviewer pushed beyond a basic design and spent a lot of time exploring failure modes, retries, idempotency, operational concerns, and correctness under real-world conditions. It felt closer to designing something that could actually run in production than many system design interviews I've done elsewhere. The coding round was also fairly challenging. The problem itself wasn't especially difficult from an algorithmic perspective, but it required careful handling of edge cases and a precise understanding of the requirements. I felt like there was less emphasis on LeetCode-style tricks and more emphasis on building a correct, production-quality solution. What went well was that the interviewers were engaged and clearly knowledgeable. The conversations felt collaborative rather than adversarial. What didn't go well, at least for me, was that I underestimated how much depth they expected around correctness and edge cases. In hindsight, I would have spent more time validating assumptions and thinking through failure scenarios before diving into implementation.”

## Community answers

No answers have been contributed by the community yet. You can [log in or sign up](https://www.aced.io/signup?src=nav&returnPath=/questions/6394/simulate-infection-spread-model) to answer this question.

## Related courses

### [AI Engineering Interview Prep](https://www.aced.io/courses/ai-engineering)

![AI Engineering Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/25mhKSvDOiCwC89lDj89Ah/9a5fbfacc8d93f05c238ab55baa4e5e5/fde.png?w=800&h=800&fm=webp&q=75)

Prepare for AI engineering interviews at companies such as Google, Anthropic, Meta, and OpenAI with frameworks, example questions, mock interviews with senior engineers, system design, AI/ML concepts, AI-assisted coding, and behavioral-round practice.

### [Generative AI Interviews](https://www.aced.io/courses/gen-ai-interviews)

![Generative AI Interviews](https://images.ctfassets.net/x78yjrjc11pq/BLBU7an1PjT0Mt2ZzAfDa/60e119c8bff0cfb8281dcb497177f6e3/AdobeStock_1510292201-min.jpeg?w=800&h=800&fm=webp&q=75)

Prepare for interviews at AI-first and AI-powered companies. Learn to explain how generative AI works, where it fails, and how to use it responsibly; understand how technology companies build and deploy AI products; and study production systems including LLMs, RAG systems, and real-world deployment.

## Submit an answer

Submitting marks this question complete.

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F6394%2Fsimulate-infection-spread-model&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F6394%2Fsimulate-infection-spread-model). Opening a form does not execute a tool.