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

# Negative numbers in test case

**kamal-tolani**#2

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

**2017-01111**#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.