## Interchange elements of first and last columns in matrix

Given a 4 x 4 matrix, the task is to interchange the elements of first and last columns and show the resulting matrix. Examples: Input:… Read More »

- Matrix Chain Multiplication (A O(N^2) Solution)
- Check if given Sudoku board configuration is valid or not
- Largest connected component on a grid
- Count the number of ways to traverse a Matrix
- Final cell position in the matrix
- Kruskal's Algorithm (Simple Implementation for Adjacency Matrix)
- Rotate a matrix by 90 degree in clockwise direction without using any extra space
- Find the number of distinct islands in a 2D matrix
- Minimum cost to buy N kilograms of sweet for M persons
- Microsoft Interview experience | Set 178 (On-Campus Internship for IDC)
- Find number of Positional Elements
- Check if the given chessboard is valid or not
- Minimum odd cost path in a matrix
- Spiral Pattern
- Print the matrix diagonally downwards
- Interchange elements of first and last columns in matrix
- Find number of cavities in a matrix
- Printing Matrix Chain Multiplication (A Space Optimized Solution)
- Minimum sum falling path in a NxN grid
- Prim's Algorithm (Simple Implementation for Adjacency Matrix Representation)
- Find the largest area rectangular sub-matrix whose sum is equal to k
- Search a string in Matrix Using Split function in Java
- Lexicographically largest prime path from top-left to bottom-right in a matrix
- Magical Pattern
- How to access elements of a Square Matrix
- Find Nth term (A matrix exponentiation example)
- Search in a sorted 2D matrix (Stored in row major order)
- Find smallest and largest element from square matrix diagonals
- Traverse matrix in L shape
- Find pair with maximum difference in any column of a Matrix

Given a 4 x 4 matrix, the task is to interchange the elements of first and last columns and show the resulting matrix. Examples: Input:… Read More »

Given a matrix mat consisting of * and lowercase English alphabets, the task is to find the character which has the maximum number of *… Read More »

Given a square matrix mat[][] of odd dimensions, the task is to change the value of the middle most element of the matrix to the… Read More »

Given a square matrix of order n*n, find the smallest and largest elements from both diagonals of the given matrix. Examples: Input : matrix =… Read More »

Given a 3X3 matrix mat with it’s left diagonal elements missing (set to 0), considering the sum of every row, column and diagonal of the… Read More »

Given two matrix A[][] and B[][] of same order m*n. The task is to find the intersection of both matrix as C, where: Cij =… Read More »

Given a 2-D Matrix and an integer ‘K’, the task is to predict the matrix after ‘K’ iterations given as follows: An element 1 in… Read More »

Given a matrix of distinct elements. The task is to sort the rows of matrix in descending order followed by sorting the columns in ascending… Read More »

Given an array of three element. The task is to construct a matrix of order 3*3 by using all three rotation of array as row… Read More »

Given an N*N matrix. The task is to convert the elements of diagonal of a matrix to 0. Examples: Input: mat[][] = {{ 2, 1,… Read More »

Given a matrix, the task is to find the maximum element of each column. Examples: Input: [1, 2, 3] [1, 4, 9] [76, 34, 21]… Read More »

You are given a matrix of order N*N. The task is to find the resultant matrix by adding the mirror image of given matrix with… Read More »

Given a matrix, the task is to find the minimum element of each row and each column. Examples: Input: [1, 2, 3] [1, 4, 9]… Read More »

Given an integer square matrix of odd dimensions (3 * 3, 5 * 5). The task is to find the product of the middle row… Read More »

Given a n*m grid and the position of some poles to be painted in the grid, the task is to find the minimum cost to… Read More »