# Category Archives: Matrix

## Boundary elements of a MatrixAugust 25, 2017

Printing Boundary Elements of a Matrix. Examples: Input : 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8… Read More »

## Print a matrix in a spiral form starting from a pointAugust 21, 2017

Given a matrix of size n*m, and a point P(c, r). Print the matrix in a spiral form(clockwise) starting from the point P. Examples: Input… Read More »

## Construct a linked list from 2D matrixAugust 16, 2017

Given a matrix. Convert it into a linked list matrix such that each node is connected to its next right and down node. Example: Input… Read More »

## Print matrix in snake patternAugust 13, 2017

Given an n x n matrix .In the given matrix, you have to print the elements of the matrix in the snake pattern. Examples: Input… Read More »

## Matrix manipulation in PythonJuly 31, 2017

In python matrix can be implemented as 2D list or 2D Array. Forming matrix from latter, gives the additional functionalities for performing various operations in… Read More »

## Print a given matrix in zigzag formJuly 24, 2017

Given a 2D array, print it in zigzag form. Examples: Input : 1 2 3 4 5 6 7 8 9 10 11 12 13… Read More »

## Maximum path sum in matrix

Given a matrix of N * M. Find the maximum path sum in matrix. The maximum path is sum of all elements from first row… Read More »

## Discrete Cosine Transform (Algorithm and Program)July 18, 2017

Image Compression : Image is stored or transmitted with having pixel value. It can be compressed by reducing the value its every pixel contains. Image… Read More »

## Find median in row wise sorted matrixJuly 15, 2017

We are given a row wise sorted matrix of size r*c, we need to find the median of the matrix given. It is assumed that… Read More »

## Program to Interchange Diagonals of MatrixJuly 5, 2017

Given a square matrix of order n*n, you have to interchange the elements of both diagonals. Examples: Input : matrix[][] = {1, 2, 3, 4,… Read More »

## Maximize matrix as per given conditionJuly 4, 2017

You are given a N*N matrix, where each element of matrix lies in the range 0 to M. You can apply the below operation on… Read More »

## Magic Square | Even OrderJune 30, 2017

A magic square of order n is an arrangement of n^2 numbers, usually distinct integers, in a square, such that the n numbers in all… Read More »

## Number of cells a queen can move with obstacles on the chessboradJune 28, 2017

Consider a N X N chessboard with a Queen and K obstacles. The Queen cannot pass through obstacles. Given the position (x, y) of Queen,… Read More »

## Matrix Multiplication | RecursiveJune 26, 2017

Given two matrices A and B. The task is to multiply matrix A and matrix B recursively. If matrix A and matrix B are not… Read More »

## Program to print Lower triangular and Upper triangular matrix of an arrayJune 19, 2017

Prerequisite – Multidimensional Arrays in C / C++ Given a two dimensional array, Write a program to print lower triangular matrix and upper triangular matrix.… Read More »