LeetCode 957: Prison Cells After N Days
Problem Restatement We are given an array cells of length 8 . Each cell is either: 0 # vacant 1 # occupied Every day, the cells change using this rule: If a cell has two adjacent neighbors that are both occupied or both vacant, the cell becomes occupied. Otherwise, it becomes vacant. The first and last cells do not have two neighbors, so they always become vacant after one day....