Lets say you have a matrix. Write a function which takes cell points and a number k. (It returns sum from rows).
for ex: func(i, j, k) here i and j are cell position. And k is a number. // I want sum from continuous rows.
I want sum from mat[i][j-k] to mat[i][j+k] + sum from mat[i-1][j-(k-1)] to mat[i-1][j+(k-1)] + sum from mat[i-2][j-(k-2)] to mat[i-2][j+(k-2)] and so on. If you go out of border add zero (do nothing).
Help me please Tell me if i clearly explai the problem or not.