← Questions

Update a grid of firing neurons

0
Scale AICodingLast asked Feb 2026

A grid holds neurons that are either firing or not. In each step every neuron's next state depends on how many of its neighbours are firing, in the style of the Game of Life. Compute the next grid; first with a copy, then update it in place with constant extra space.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding