# Category Archives: Matrix

Given a square matrix mat[][] of dimension N and an integer K, the task is to rotate the matrix by 90 degrees K times withoutâ€¦ Read More
Given a N x N chessboard and the position of X bishops on it, the task is to calculate the count of pairs of bishopsâ€¦ Read More
Given an N x M matrix mat[][] where initially we are standing at the cell with index (i, j), the task is to find theâ€¦ Read More
Given a matrix mat[][] and an integer K, the task is to find the length of the shortest path in a matrix from top-left toâ€¦ Read More
Given a 2d array mat[][], the task is to find and print the prime numbers along with their position (1-based indexing) in this 2d array.â€¦ Read More
Given two matrices, the task to multiply them. Matrices can either be square or rectangular. Examples:Â  Input : mat1[][] = {{1, 2}, {3, 4}} mat2[][]â€¦ Read More
Given two matrices, the task to multiply them. Matrices can either be square or rectangular. Examples:Â  Input : mat1[][] = {{1, 2}, {3, 4}} mat2[][]â€¦ Read More
Given two matrices, the task to multiply them. Matrices can either be square or rectangular. Examples:  Input : mat1[][] = {{1, 2}, {3, 4}} mat2[][]â€¦ Read More
Given two matrices, the task to multiply them. Matrices can either be square or rectangular. Examples:Â  Input : mat1[][] = {{1, 2}, {3, 4}} mat2[][]â€¦ Read More
Given two matrices, the task to multiply them. Matrices can either be square or rectangular. Examples:Â  Input : mat1[][] = {{1, 2}, {3, 4}} mat2[][]â€¦ Read More
Given a 2-D array matrix[][] of size ROW * COL and an integer K, where each cell matrix[i][j] is either 0 (empty) or 1 (obstacle).â€¦ Read More
Given an array arr of size N, the task is to find the largest element in the given array.  Example:  Input: arr[] = {10, 20,â€¦ Read More
Given 3 arrays X[], Y[], and T[] all of the size N where X[i] and Y[i] represent the i-th coordinate and T[i] represents the timeâ€¦ Read More
Given a matrix mat[][] of size N*N, the task is to rotate the matrix by 45 degrees and print the matrix. Examples: Input: N =â€¦ Read More
Given a square matrix, turn it by 90 degrees in anti-clockwise direction without using any extra space.Examples :Â Â  Input: Matrix: 1 2 3 4 5â€¦ Read More