Comments

Samuel Egwurube6 months ago

const solve = (twoD, oneD) => {
  let totalArr = []
  function oneDiteration(arr){
    let accumulator = 0
    for(let i=0;i<arr.length;i++){
      accumulator += (arr[i]*oneD[i])
    }
    return accumulator
  }
  return Math.max(...twoD.map(array=> oneDiteration(array)))
};