Prison Cells Example - Why is Day 1, Cell 8 [1,7] == 0?

In the given example, Day 1, Cell 8 [1,7] shows 0.

	Input: cells = [0,1,0,1,1,0,0,1], N = 7
    Output: [0,0,1,1,0,0,0,0]
    Explanation: 
    The following table summarizes the state of the prison on each day:
    Day 0: [0, 1, 0, 1, 1, 0, 0, 1]
    Day 1: [0, 1, 1, 0, 0, 0, 0, 0]  # <--- last cell here is the one I'm talking about
    Day 2: [0, 0, 0, 0, 1, 1, 1, 0]
    Day 3: [0, 1, 1, 0, 0, 1, 0, 0]
    Day 4: [0, 0, 0, 0, 0, 1, 0, 0]
    Day 5: [0, 1, 1, 1, 0, 1, 0, 0]
    Day 6: [0, 0, 1, 0, 1, 1, 0, 0]
    Day 7: [0, 0, 1, 1, 0, 0, 0, 0]

From my understanding of the rules, it should be 1.

My understanding....
I'm referencing the state at the beginning of the day to figure out what to change
(that is, I'm looking at [0,7] for this example.)

Day 0: [0, 1, 0, 1, 1, 0, 0, 1]

At the beginning of the day, the left neighbor of Cell 8 (index 7) is 0
The cell to the right of Cell 8 (index 7) is always 0.
If they're both unoccupied, Cell 8(index 7) should be occupied (1).
If they don't match, they should be 0.

According to what I'm looking at, then, the current day should be setting [1,7] to 1, not 0, like the example shows.

Can someone explain what I'm misunderstanding?

Comments (1)