OpenAI·Software Engineer·Technical Phone Screen
- Given an m x n grid where some cells start infected, and a healthy cell becomes infected each minute only if at least K of its 4-directional neighbors are currently infected, find the minute when all reachable cells are infected, or determine if some cells will never become infected.
“My first instinct was BFS and I went down that road for a few minutes before realizing the K-neighbor condition makes it way messier than standard BFS.”