reorg and add code for second edition
This commit is contained in:
7
11_dynamic_programming/javascript/examples/base.js
Normal file
7
11_dynamic_programming/javascript/examples/base.js
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = function initialize_matrix(rows, cols) {
|
||||
let matrix = [];
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
matrix.push(Array(cols.length).fill(0));
|
||||
}
|
||||
return matrix;
|
||||
};
|
||||
Reference in New Issue
Block a user