Take out a piece of paper. We’ll be programming on paper.
Write a method multiply that takes a two dimensional array of ints and an int. The methods should return a two dimensional array that is the original array multiplied by the int.
Write a method transpose that takes a two dimensional array of doubles and returns the transposed matrix.
[ [ 1, | 2 ] |
[ 3, | 4 ] |
[ 5, | 6 ] ] |
Transposes into
[ [ 1, | 3, | 5 ] |
[ 2, | 4, | 6 ] ] |