Search⌘ K
AI Features

Game of Life

Understand and implement the Game of Life algorithm, a matrix-based cellular automaton problem. Learn the rules governing cell survival and how to update the board state efficiently, preparing you for coding interviews that involve matrix traversal and state updates.

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:

    ...