Complete "longest common ..." examples (#100)
* no else return * fix var ref * fix importing/requiring dependencies * complete longest common examples
This commit is contained in:
committed by
Aditya Bhargava
parent
c23ca90b83
commit
5b675cc2e8
@@ -1,7 +1,7 @@
|
||||
export default function initialize_matrix(rows, cols){
|
||||
let matrix = [];
|
||||
for (let i = 0; i < rows.length; i++){
|
||||
matrix.push(Array(cols.length).fill(0));
|
||||
}
|
||||
return matrix;
|
||||
}
|
||||
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