## 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
- Final cell position in the matrix
- Count the number of ways to traverse a Matrix
- Kruskal's Algorithm (Simple Implementation for Adjacency Matrix)
- Find the number of distinct islands in a 2D matrix
- Rotate a matrix by 90 degree in clockwise direction without using any extra space
- 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
- Minimum odd cost path in a matrix
- Spiral Pattern
- Print the matrix diagonally downwards
- Check if the given chessboard is valid or not
- Minimum sum falling path in a NxN grid
- Printing Matrix Chain Multiplication (A Space Optimized Solution)
- Lexicographically largest prime path from top-left to bottom-right in a matrix
- Find the largest area rectangular sub-matrix whose sum is equal to k
- Prim's Algorithm (Simple Implementation for Adjacency Matrix Representation)
- Find number of cavities in a matrix
- Search a string in Matrix Using Split function in Java
- Magical Pattern
- How to access elements of a Square Matrix
- Find Nth term (A matrix exponentiation example)
- Traverse matrix in L shape
- Find pair with maximum difference in any column of a Matrix
- Program to check if a matrix is Binary matrix or not
- Program to print Spiral Pattern
- Search in a sorted 2D matrix (Stored in row major order)

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 »