diff --git a/Algorithms/Dynamic Programming/C++/MinCostPath.cpp b/Algorithms/Dynamic Programming/C++/MinCostPath.cpp new file mode 100644 index 0000000..e768d5c --- /dev/null +++ b/Algorithms/Dynamic Programming/C++/MinCostPath.cpp @@ -0,0 +1,39 @@ +#include +#define endl "\n" +using namespace std; + +const int row = 3; +const int col = 3; + +int minCost(int cost[row][col]) { + + // for 1st column + for (int i=1 ; i