Search⌘ K
AI Features

Game of Life

Explore the Game of Life problem, a cellular automaton where you update an m by n grid based on neighbors' states. Understand the rules and implement the next board state using matrix traversal, aiding coding interview pattern recognition and problem-solving skills.

Statement

The Game of Life, also known simply as Life, is a cellular automaton introduced by British mathematician John Horton Conway in 1970.

We are given an m×nm \times n grid representing the board. Each cell has one of two states:

    ...