##
Find difference between sums of two diagonals
April 16, 2017

Given a matrix of n X n. The task is to calculate the absolute difference between the sums of its diagonal. Examples: Input : mat[][]… Read More »

April 16, 2017

Given a matrix of n X n. The task is to calculate the absolute difference between the sums of its diagonal. Examples: Input : mat[][]… Read More »

Given a matrix of size n x n, find sum of the Zigzag sequence with the largest sum. A zigzag sequence starts from the top… Read More »

April 15, 2017

Given two values m and n, fill a matrix of size ‘m*n’ in spiral (or circular) fashion (clockwise) with natural numbers from 1 to m*n.… Read More »

April 11, 2017

Given a binary N x N matrix, we need to find the total number of matrix positions from which there is an endless path. Any… Read More »

April 10, 2017

Background: Following are the rules of Suduku for a player. In all 9 sub matrices 3×3 the elements should be 1-9, without repetition. In all… Read More »

April 3, 2017

Initially, there is a grid with some cells which may be alive or dead. Our task to generate the next generation of cells based on… Read More »

March 31, 2017

Given a positive integer N. Consider a matrix of N X N. No cell can be accessible from any other cell, except the given pair… Read More »

March 20, 2017

Given a 2D matrix, the task is that we find maximum sum of a hour glass. An hour glass is made of 7 cells in… Read More »

March 19, 2017

Given a grid which consists of 4 types of characters : ‘B’ ‘.’ ‘S’ and ‘D’. We need to reach D starting from S, at… Read More »

March 12, 2017

Given a square matrix, turn it by 90 degrees in anti-clockwise direction without using any extra space. Examples: Input 1 2 3 4 5 6… Read More »

March 11, 2017

Given a square matrix of order n*n, find the maximum and minimum from the matrix given. Examples: Input : arr[][] = {5, 4, 9, 2,… Read More »

March 7, 2017

Given a 2D array, the task is to print matrix in anti spiral form: Examples: Output: 16 15 14 13 12 11 10 9 8… Read More »

March 6, 2017

A Skew Symmetric Matrix or Anti-Symmetric Matrix is a square matrix whose transpose is negative to that of the original matrix. If the entry in… Read More »

March 4, 2017

Given a 2D matrix, the task is to find Trace and Normal of matrix. Normal of a matrix is defined as square root of sum… Read More »

Given a gold mine of n*m dimensions. Each field in this mine contains a positive integer which is the amount of gold in tons. Initially… Read More »