# Category Archives: Matrix

## Accolite Interview | Set 2 (On-Campus)

Accolite came to our campus for recruitment. First Round Written Test: 30 MCQs in which question related to DS Networking OS Unix commands DBMS. Questions… Read More »

## Print all elements in sorted order from row and column wise sorted matrix

Given an n x n matrix, where every row and column is sorted in non-decreasing order. Print all elements of matrix in sorted order. Example:… Read More »

## MakeMyTrip Interview Experience

MakeMyTrip recently visited our campus to hire full time employees. Here’s my interview experience: Round 1: (Online MCQs) Questions on aptitude, English, logical reasoning, C/C++… Read More »

Given the mobile numeric keypad. You can only press buttons that are up, left, right or down to the current button. You are not allowed… Read More »

## Given an n x n square matrix, find sum of all sub-squares of size k x k

Given an n x n square matrix, find sum of all sub-squares of size k x k where k is smaller than or equal to… Read More »

## Program to check if two given matrices are identical

The below program checks if two square matrices of size 4*4 are identical or not.For any two matrix to be equal, number of rows and… Read More »

## Python Program to find transpose of a matrix

Transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of A[][] is obtained by changing… Read More »

## Program to find transpose of a matrix

Transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of A[][] is obtained by changing… Read More »

## Program for subtraction of matrices

The below program subtracts of two square matrices of size 4*4, we can change N for different dimension. C++ filter_none edit close play_arrow link brightness_4… Read More »

## Program for addition of two matrices

The below program adds two square matrices of size 4*4, we can change N for different dimension. Recommended: Please solve it on “PRACTICE” first, before… Read More »

## Program to multiply two matrices

Given two matrices, the task to multiply them. Matrices can either be square or rectangular. Examples: Input : mat1[][] = {{1, 2}, {3, 4}} mat2[][]… Read More »

## Program to find largest element in an array

Given an array, find the largest element in it. Example: Input : arr[] = {10, 20, 4} Output : 20 Input : arr[] = {20,… Read More »

## Create a matrix with alternating rectangles of O and X

Write a code which inputs two numbers m and n and creates a matrix of size m x n (m rows and n columns) in… Read More »

## Kth smallest element in a row-wise and column-wise sorted 2D array | Set 1

Given an n x n matrix, where every row and column is sorted in non-decreasing order. Find the kth smallest element in the given 2D… Read More »

## Divide and Conquer | Set 5 (Strassen’s Matrix Multiplication)

Given two square matrices A and B of size n x n each, find their multiplication matrix. Naive Method Following is a simple way to… Read More »