OpenAI

Verified interview challenge

Build a grid infection simulator

Extend one grid simulation as infection, immunity and recovery rules become more demanding.

Unlock with Full Access

The challenge

Start with basic infection spread, then carry the implementation into parts with immunity and timed recovery. Updates happen simultaneously within each tick, so state changes must not leak into neighbouring calculations too early. Later variations build on the shared parts, with guided practice and a timed mock available.

What you'll practise

  • Tick boundaries

    Keep the current and next state consistent across all cells.

  • Evolving state rules

    Extend the simulation without losing the timing and behaviour of earlier parts.

Your coding workspacePreview
Current partFurther parts unlock as you progress
solution.pyPython 3.13
# Build on your implementation

# Run checks for the current part

# Full starter code included
Current-part checks

Run your code to see results.

The complete sequence, starter code and checks are included with Full Access.