Imagine that the user provides two 2D grids. The first grid will have a single row of length N, while the second grid would have a single column with N elements in it. Return the sum of multiplying each pair of elements in the same
slot if you took the transpose of one of the 2D grids. For example, if the user enters[[1, 2, 3, 5]] and
[[2], [3], [4], [5]] , your code would return 45 (which is 1*2 + 2*3 + 3*4 + 5*5 ).
Please do not use any Java code or libraries that we have not covered in class; this defeats the purpose of the
assessment. |