## 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 »

## Pair with given sum in matrix

Given a NxM matrix and a sum S. The task is to check if a pair with given Sum exists in the matrix or not.… Read More »

## Pair with maximum difference in a Matrix

Given a NxM matrix with N rows and M columns of positive integers. The task is to find the pair with the maximum difference in… Read More »

## Pair with maximum sum in a Matrix

Given a NxM matrix with N rows and M columns of positive integers. The task is to find the sum of pair with maximum sum… Read More »

## Program to find the maximum element in a Matrix

Given a NxM matrix. The task is to find the maximum element in this matrix. Examples: Input: mat[4][4] = {{1, 2, 3, 4}, {25, 6,… Read More »

## Sum of alternate elements of a N x N matrix

Given an NxN matrix. The task is to find the sum of the alternate elements of the given matrix. For example, in a 2 x… Read More »

## How to access elements of a Square Matrix

A square matrix is a matrix in which contains elements in the form of Rows and Columns. Below is an example of a 5×5 matrix.… Read More »

## Traverse matrix in L shape

Given a N * M matrix. The task is to traverse the given matrix in L shape as shown in below image. Examples: Input :… Read More »

## Find pair with maximum difference in any column of a Matrix

Given a N*N matrix of positive integers. The task is to find the maximum difference between any pair of elements in any column of the… Read More »

## Find column with maximum sum in a Matrix

Given a N*N matrix. The task is to find the index of column with maximum sum. That is the column whose sum of elements are… Read More »

## Find row with maximum sum in a Matrix

Given an N*N matrix. The task is to find the index of a row with the maximum sum. That is the row whose sum of… Read More »

## Find the number of distinct islands in a 2D matrix

Given a boolean 2D matrix. The task is to find the number of distinct islands where a group of connected 1s (horizontally or vertically) forms… Read More »

## Lexicographically largest prime path from top-left to bottom-right in a matrix

Given a m x n matrix of positive integers. The task is to find the number of paths from the top left of the matrix… Read More »

## Print index of columns sorted by count of zeroes in the Given Matrix

Given a matrix with N rows and M columns. The task is to print the index of columns of the given matrix based on the… Read More »

## Minimum cost to buy N kilograms of sweet for M persons

Given an array of n size contains the cost of sweets in such a way that that sweet[i] is the cost of i sweets. The… Read More »