#
2D-Array
⚡ [NOTE!] ⚡
Write each method in such a way that they can be used in other problems.
#
Problem-1
2D-Array
easy
Create a method named createMatrix() that will take row and col as parameter and create a matrix by taking user input and return the matrix.
#
Problem-2
2D-Array
easy
Create a method named printMatrix() that will take a matrix as parameter and print the matrix.
#
Problem-3
2D-Array
easy
Create method named addition() that will take two matrices of same size as a parameter and return the summation of those two matrices.
#
Problem-4
2D-Array
easy
Create a java method named sumOfBoundary() that takes a matrix as parameter and find the sum of all the boundary elements in the matrix.
Explanation: Elements that are in the boundary of this matrix are 11+22+33+44+55+88+1+2+3+4 = 263
#
Problem-5
2D-Array
medium
Create a java method named multiplication() that two matrices as parameter and perform matrix multiplication and return the new matrix.
⚡ [NOTE!] ⚡
You have to handle constraints like, if both matrices are compatible for matrix multiplication.
#
Problem-6
2D-Array
medium
Create a java method named transpose() that takes a matrix as parameter and transpose the matrix and return the new transposed matrix.
#
Problem-7
2D-Array
hard
Create a java method named spiralTraversal() that takes a matrix as parameter and prints the matrix in spiral order.