Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Game of Life

Medium Matrix

In Conway's Game of Life each cell is live (1) or dead (0). A live cell with fewer than 2 or more than 3 live neighbours dies; a live cell with 2 or 3 stays alive; a dead cell with exactly 3 live neighbours becomes alive. Print the next state of an R x C board.

Constraints

1 <= R, C <= 25

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.