Paths in Matrix Whose Sum Is Divisible by K
Count right-or-down paths by the remainder of their sum mod k, so each cell stores one count per remainder.
Count right-or-down paths by the remainder of their sum mod k, so each cell stores one count per remainder.