Cody

# Problem 52. What is the next step in Conway's Life?

Solution 2068573

Submitted on 24 Dec 2019 by Asif Newaz
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
A = [ ... 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0]; B = [ ... 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0]; assert(isequal(gameOfLife(A),B))

A = 1 1 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 0 0 0 A = 0 1 1 0 0 1 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 A = 0 1 1 0 0 1 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 A = 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 c = 3 c = 3 d = 2 d = 1 d = 5 c = 5 d = 3 d = 2 c = 3 c = 3 d = 2 d = 1 d = 4 d = 4 d = 2 d = 2

2   Pass
A = [ ... 0 1 1 0 1 1 1 0 0 0 1 0 0 0 0 0]; B = [ ... 1 0 1 1 1 0 0 0 0 0 1 1 0 1 1 0]; assert(isequal(gameOfLife(A),B))

A = 0 1 1 0 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 A = 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 A = 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 A = 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 d = 3 c = 5 c = 4 d = 3 c = 3 c = 6 c = 5 d = 4 d = 2 d = 4 c = 3 d = 3 d = 1 d = 3 d = 3 d = 2