According to Conway's Game of Life rules, cells on a 2D grid live or die based on their 8 neighbors. Given the current state of a board, return a new board representing the next generation's state.
Transitions are governed by these rules:
1) with fewer than two live neighbors dies (underpopulation).1) with two or three live neighbors lives on to the next generation.1) with more than three live neighbors dies (overpopulation).0) with exactly three live neighbors becomes a live cell (reproduction).Visualizer will appear here