How to find minimum cost path in a matrix using dynamic programming within 9 mins

preview_player
Показать описание
Joey'sTech dynamic programming tutorial series brings you one of the coolest, simplest and most interesting dynamic problems - the minimum cost path in a matrix problem.

By watching this video of Joey'sTech you're going to add another matrix problem your inventory list and take another step up the ladder to become a matrix problem solver.

In the previous video, you learnt to count all possible paths between two points in a matrix from top left to bottom right corner and this DP problem is very similar to it.

That's why I say that you're going to enjoy it a lot because I am sure you'd have enjoyed solving it too.So, let's take a look at the problem of determining minimum cost path in a matrix.


You're given a matrix of 3 rows and 3 columns(3X3) and each cell contains the cost to reach that cell.

You need to find out the minimum cost path to reach the bottom-right corner of the matrix if you start from the top-left corner. You can apply the Dynamic programming technique on this problem.
There is also one condition which adds simplicity to this problem, this condition says that you can either move down or right only.

In this DP problem video, not only I will teach you how to find the minimum cost but we are going to determine the exact path leading to the minimum cost.

So, what are you waiting for? Watch this video and bring an addition to your knowledge bucket.

Also, check out some more Dynamic programming problems from Joey'sTech


longest increasing subsequence problem using dynamic programming

Text justification problem

Word break problem
Рекомендации по теме
Комментарии
Автор

Really informative videos. Helps a lot to get perfect understanding of dynamic programming.

sumitsaxena
join shbcf.ru