Rotating Elements of a Matrix by 90 Degrees

We’ll understand rotating elements of a matrix by 90 degrees, without using extra space and write the program to implement the same. Directly placing the elements of a matrix row by row in a temporary matrix is a reasonable solution, but the space complexity doubles in that case, when we have large sets of data, … Read more

Program for Spiral Traversal of a Matrix

We’ll learn to write a program for spiral traversal of a matrix of size m x n, which does mean as it sounds, we’ll start the corner of the matrix and traverse in a spiral towards the center of the matrix. Understanding the question, and output Given: Matrix, SizeOutput: Printing elements in a line using … Read more

Program to Search in Row-wise and Column-wise Sorted Matrix

Program to search in a row-wise column-wise sorted matrix i.e. printing the location of an element(if it exists) in a row and column-wise sorted matrix.