What goes in the blank?
# 4-way neighbours of grid cell (r, c)
for dr, dc in ((1, 0), (-1, 0), (0, 1), (0, ____)):
nr, nc = r + dr, c + dc
Answer: -1
The four moves are down, up, right and left; left is a column step of -1.
Play Problem Solving ▸