Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day-23 q1 Minimum falling path sum #446

Open
SonaVarshney opened this issue Jan 19, 2024 · 6 comments
Open

Day-23 q1 Minimum falling path sum #446

SonaVarshney opened this issue Jan 19, 2024 · 6 comments
Assignees

Comments

@SonaVarshney
Copy link
Contributor

Minimum Falling Path Sum

Given an n x n array of integers matrix, return the minimum sum of any falling path through matrix.
A falling path starts at any element in the first row and chooses the element in the next row that is either directly below or diagonally left/right.
Specifically, the next element from position (row, col) will be (row + 1, col - 1), (row + 1, col), or (row + 1, col + 1).

Example 1:

image
Input: matrix = [[2,1,3],[6,5,4],[7,8,9]]
Output: 13
Explanation: There are two falling paths with a minimum sum as shown.

Example 2:

image

Input: matrix = [[-19,57],[-40,-5]]
Output: -59
Explanation: The falling path with a minimum sum is shown.

Constraints:

  • n == matrix.length == matrix[i].length
  • 1 <= n <= 100
  • -100 <= matrix[i][j] <= 100
@SonaVarshney
Copy link
Contributor Author

@kratika-Jangid @karishma-2020 @bh-g please merge the question #429. Thanks :)

@namita0210
Copy link
Contributor

@bh-g Pls assign this issue to me for a java solution

@Tech-neophyte
Copy link
Contributor

@bh-g @kratika-Jangid Please assign this issue to me for cpp solution...

@SonaVarshney
Copy link
Contributor Author

pls merge the solution of this question #483 thanks :)
@bh-g @karishma-2020 @kratika-Jangid

@Karnankita04
Copy link
Contributor

@bh-g please assign this issue to me

@Shubh-Krishna
Copy link
Contributor

please assign this question to me :) @bh-g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants