Skip to content

Latest commit

 

History

History
131 lines (87 loc) · 5.73 KB

MATRIX.md

File metadata and controls

131 lines (87 loc) · 5.73 KB

MATRIX

Print Matrix in Spiral Order

Create Spiral Matrix from given array

Shift all matrix elements by 1 in Spiral Order

Find Shortest path from source to destination in a matrix that satisfies given constraints

Change all elements of row i and column j in a matrix to 0 if cell (i, j) has value 0

Print diagonal elements of the matrix having positive slope

Find all paths from first cell to last cell of a matrix

Replace all occurrences of 0 that are not surrounded by 1 in a binary matrix

In-place rotate the matrix by 90 degrees in clock-wise direction

Count negative elements present in sorted matrix in linear time

Report all occurrences of an element in row wise and column wise sorted matrix in linear time

Calculate sum of all elements in a sub-matrix in constant time

Find maximum sum K x K sub-matrix in a given M x N matrix

Find maximum sum submatrix present in a given matrix

Find probability that a person is alive after taking N steps on the island

Count the number of islands

Flood fill Algorithm

Find shortest safe route in a field with sensors present

Find all occurrences of given string in a character matrix

Shortest path in a Maze | Lee algorithm

Check if given matrix is Toeplitz matrix or not

In-place rotate the matrix by 180 degrees

Fill Binary Matrix with Alternating Rectangles of 0 and 1

Find all common elements present in every row of given matrix

Construct a Binary Tree from Ancestor Matrix

Find common elements present in all rows of a matrix

Travelling Salesman Problem using Branch and Bound

Collect maximum points in a matrix by satisfying given constraints

Count number of paths in a matrix with given cost to reach destination cell

Find longest sequence formed by adjacent numbers in the matrix

Find the minimum cost to reach last cell of the matrix from its first cell

Matrix Chain Multiplication

Find size of largest square sub-matrix of 1’s present in given binary matrix

Chess Knight Problem – Find Shortest path from source to destination

Find Duplicate rows in a binary matrix

Print all possible solutions to N Queens problem

Print all Possible Knight’s Tours in a chessboard

Find Shortest Path in Maze

Find Longest Possible Route in a Matrix

Calculate size of the largest plus of 1's in binary matrix

Find the maximum value of M[c][d] – M[a][b] over all choices of indexes

Find shortest distance of every cell from landmine in a Maze

Find shortest route in a device to construct the given string