# Category Archives: Matrix (adsbygoogle = window.adsbygoogle || []).push({});

## Print the matrix diagonally downwards

Given a matrix of size n*n, print the matrix in the following pattern. Output: 1 2 5 3 6 9 4 7 10 13 8… Read More »

## Find number of Positional Elements

Given a matrix of integers, task is to find out number of positional elements. A positional element is one which is either minimum or maximum… Read More »

## Finding the probability of a state at a given time in a Markov chain | Set 2

Given a Markov chain G, we have the find the probability of reaching the state F at time t = T if we start from… Read More »

## Count majority element in a matrix

Given a NxM matrix of integers containing duplicate elements. The task is to find the count of all majority occurring elements in the given matrix,… Read More »

## Sum of all maximum frequency elements in Matrix

Given a NxM matrix of integers containing duplicate elements. The task is to find the sum of all maximum occurring elements in the given matrix.… Read More »

## Program to find the Sum of each Row and each Column of a Matrix

Given a matrix of order m*n, the task is to find out the sum of each row and each column of a matrix. Examples: Input:… Read More »

## Sum of all even frequency elements in Matrix

Given a NxM matrix of integers containing duplicate elements. The task is to find the sum of all even occurring elements in the given matrix.… Read More »

## Minimum sum falling path in a NxN grid

Given an square array A of integers of size NxN. The task is to find the minimum sum of a falling path through A. A… Read More »

## Sum of all minimum frequency elements in Matrix

Given a NxM matrix of integers containing duplicate elements. The task is to find the sum of all minimum occurring elements in the given matrix.… Read More »

## Find the maximum sum of Plus shape pattern in a 2-D array

Given a 2-D array of size N*M where, . The task is to find the maximum value achievable by a + shaped pattern. The elements… Read More »

## Sum of all odd frequency elements in a Matrix

Given a NxM matrix of integers containing duplicate elements. The task is to find the sum of all odd occurring elements in the given matrix.… Read More »

## Check if a king can move a valid move or not when N nights are there in a modified chessboard

Given an infinite chessboard with the same rules as that of chess. Also given are N knights coordinates on the infinite chessboard(-10^9 <= x, y… Read More »

## Program to print Spiral Pattern

Given a number n as the size of the matrix, the task is to print a spiral pattern in 2D array of size n. Examples:… Read More »

## Check if a pair with given absolute difference exists in a Matrix

Given a NxM matrix and a difference K. The task is to check if a pair with the given absolute difference exists in the matrix… Read More »

## Check if a pair with given product exists in a Matrix

Given a NxM matrix and a product K. The task is to check if a pair with the given product exists in the matrix or… Read More »