Shortest Path Problem
CodeChefOpen on judge ↗
Consider a two dimensional array of numbers comprehended between 0 and 9(as shown below). The Matrix can be traversed following any orthogonal direction (i.e., north, south, east and west). Considering that each cell represents a cost, Your task is to find the minimum cost value to go from the top-left corner to the bottom-right corner of a given number array of size NxM where 1 0 3 1 2 9 7 3 4
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start