Minimum Cost Path Dynamic Programming Explained with Code | Leetcode #64

Veröffentlicht am: 31 Juli 2020
auf dem Kanal: Pepcoding
60,435
1.3k

Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.

NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we discuss the solution for the Minimum Cost Path problem where we are required to reach the bottom right corner from the top left corner with minimum cost. For a better understanding of the problem, click here:    • Minimum Cost Path - Question | Dynami...  . In this problem,

1. You are given a number n, representing the number of rows.
2. You are given a number m, representing the number of columns.
3. You are given n*m numbers, representing elements of 2d array a, which represents a maze.
4. You are standing in top-left cell and are required to move to bottom-right cell.
5. You are allowed to move 1 cell right (h move) or 1 cell down (v move) in 1 motion.
6. Each cell has a value that will have to be paid to enter that cell (even for the top-left and bottom-right cell).
7. You are required to traverse through the matrix and print the cost of path which is least costly.

For a better experience and more exercises, VISIT: https://www.pepcoding.com/resources/o...

#dp #dynamicprogramming #mincostpath
Have a look at our result: https://www.pepcoding.com/placements
Follow us on our FB page:   / pepcoding  
Follow us on Instagram:   / pepcoding  
Follow us on LinkedIn:   / pepcoding-education  


Auf dieser Seite können Sie das Online-Video Minimum Cost Path Dynamic Programming Explained with Code | Leetcode #64 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Pepcoding 31 Juli 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 60,435 Mal angesehen und es wurde von 1.3 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!