Simulate Threshold Infection Efficiently
Company: Anthropic
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: hard
Interview Round: Onsite
Overview: Compute infection times on a grid where healthy cells change in synchronous rounds after reaching an infected-neighbor threshold. Use incremental neighbor counts and a round-aware queue to avoid repeatedly scanning the entire grid, including threshold-zero and never-infected cases.
Read the full Anthropic Software Engineer interview experience this question came from