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.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.