Given two matrices, the task to multiply them. Matrices can either be square or rectangular....
Given two matrices, the task to multiply them. Matrices can either be square or rectangular....
Given a 2D square matrix, find the sum of elements in Principal and Secondary diagonals. For example, consider the following 4 X 4 input matrix....
Given a matrix, clockwise rotate elements in it....
Given a square matrix, turn it by 90 degrees in anti-clockwise direction without using any extra space.Examples :...
A two-dimensional array or simply 2D array is a format to store data in a grid format that is rows and columns format. There is no special way of declaring a 2D array in JavaScript, we can simply pass an array as an element inside another array. the array obtained in this method will be created as a 2D array....
Given a square matrix, turn it by 90 degrees in anti-clockwise direction without using any extra space.Examples :...
I was called to Noida office of Adobe situated in sector 132 Noida....
A square matrix is said to be symmetric matrix if the transpose of the matrix is same as the given matrix. Symmetric matrix can be obtain by changing row to column and column to row....
Given a 2D binary matrix of N rows and M columns. The task is to check whether the matrix is horizontal symmetric, vertical symmetric, or both. The matrix is said to be horizontal symmetric if the first row is the same as the last row, the second row is the same as the second last row, and so on. And the matrix is said to be vertical symmetric if the first column is the same as the last column, the second column is the same as the second last column, and so on. Print “VERTICAL” if the matrix is vertically symmetric, “HORIZONTAL” if the matrix is vertically symmetric, “BOTH” if the matrix is vertical and horizontal symmetric, and “NO” if not symmetric....
In mathematics, a square matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is larger than or equal to the sum of the magnitudes of all the other (non-diagonal) entries in that row. More precisely, the matrix A is diagonally dominant if...
Given a matrix of n X n. The task is to calculate the absolute difference between the sums of its diagonal.Examples:...