Negative numbers in test case


#1

The test cases have negative numbers in the grid while the statement clearly mentioned non-negative numbers.


#2

yeah, test cases have negative numbers while its mentioned non negative numbers in the question description.


#3

Although its bad of Interview-bit to put negative numbers in a test case, I believe the fact that it belongs to dp section (and not to greedy section) lights a bulb in my mind. Which essentially says, we need to use bellman ford algorithm and not the Dijkstra’s.
You can imagine matrix as a graph with nodes represented by co-ordinate and edge cost represented by the value at that co-ordinate point.


#4

Statement doesn’t have that note anymore, so this issue is no longer valid.