Skip to content

r / c [terminology]

Terminology

Usage

  • Use for row and column coordinates in matrix and grid algorithms.
  • They may be loop variables, current coordinates, or recursive coordinates.
  • Prefer them over row and col when the scope is compact.
  • Do not use r simultaneously as both “row” and “right pointer” in the same scope.
for r in range(m):
    for c in range(n):
        val = matrix[r][c]