Maximize path sum from top-left cell to all other cells of a given Matrix
Given a matrix, mat[][] of dimensions N * M, the task is to find the maximum path sum from the top-left cell (0, 0) to all other cells of the given matrix. Only possible moves from any cell (i, j) is (i + 1, j) and (i, j + 1). Examples: Input: mat[][] = {{3, 2, 1}, {6, 5, 4}, {7, 8, 9}}Output:3 5 69