Path with Maximum Gold - Dynamic Programming | Goldmine Problem Explained
55.4 هزار بار بازدید -
4 سال پیش
-
Please consume this content on
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 Path with Maximum Gold problem or the Goldmine Problem where we are required to find maximum sum while traveling from the left edge to the right edge. For a better understanding of the problem, click here: Goldmine - Question | Dynamic Program.... 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 gold mine.
4. You are standing in front of left wall and are supposed to dig to the right wall. You can start from any row in the left wall.
5. You are allowed to move 1 cell right-up (d1), 1 cell right (d2) or 1 cell right-down(d3).
#dp #goldmine #maximumgold
For a better experience and more exercises, VISIT: https://www.pepcoding.com/resources/o...
Have a look at our result: https://www.pepcoding.com/placements
Follow us on our FB page: Facebook: pepcoding
Follow us on Instagram: Instagram: pepcoding
Follow us on LinkedIn: LinkedIn: pepcoding-education
NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we discuss the Path with Maximum Gold problem or the Goldmine Problem where we are required to find maximum sum while traveling from the left edge to the right edge. For a better understanding of the problem, click here: Goldmine - Question | Dynamic Program.... 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 gold mine.
4. You are standing in front of left wall and are supposed to dig to the right wall. You can start from any row in the left wall.
5. You are allowed to move 1 cell right-up (d1), 1 cell right (d2) or 1 cell right-down(d3).
#dp #goldmine #maximumgold
For a better experience and more exercises, VISIT: https://www.pepcoding.com/resources/o...
Have a look at our result: https://www.pepcoding.com/placements
Follow us on our FB page: Facebook: pepcoding
Follow us on Instagram: Instagram: pepcoding
Follow us on LinkedIn: LinkedIn: pepcoding-education
4 سال پیش
در تاریخ 1399/05/10 منتشر شده
است.
55,480
بـار بازدید شده