Skip to content

nr / nc [terminology]

Terminology

Usage

  • Use for the next or neighboring row and column derived from r and c.
  • They are appropriate when paired with dr and dc.
  • Here, n means “next,” not a dimension.
  • Avoid underscore suffixes such as nr_ and nc_.
nr, nc = r + dr, c + dc

if 0 <= nr < m and 0 <= nc < n:
    dfs(nr, nc)