dr / dc [terminology] Terminology¶ Usage¶ Use for row and column direction offsets. They describe movement, not absolute coordinates. Typical values are negative one, zero, and one. for dr, dc in ((-1, 0), (1, 0), (0, -1), (0, 1)): nr, nc = r + dr, c + dc if 0 <= nr < m and 0 <= nc < n: dfs(nr, nc) See 200. Number of Islands.