Top 50 Problems on Matrix/Grid Data Structure asked in SDE Interviews Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report A Matrix/Grid is a two-dimensional array that consists of rows and columns. It is an arrangement of elements in horizontal or vertical lines of entries. Here is the list of the top 50 frequently asked interview questions on Matrix/Grid in the SDE Interviews. Problems in this Article are divided into three Levels so that readers can practice according to the difficulty level step by step. Refer to the Tutorial on Matrix/Grid to learn more about Matrix Data Structure.Easy ProblemsRotate Matrix ElementsSort the matrixTurn image by 90-degreeMultiply two matricesMaximum element of each row in a matrixCount sorted rows in a matrixCommon elements in all rows of matrixPrint matrix in snake patternSort a Matrix in all way increasing orderRow with maximum 1sSums of diagonals of a matrixArray subset CheckBoundary elements of a MatrixMagic squareMedium ProblemsPeak Element in 2D matrixMatrix MedianRotate matrix by 90 degree without extra space Rotate Matrix by 180 degreeRotate the matrix right by K timesPrint a given matrix in spiral formZigzag (or diagonal) traversal of MatrixSpiral Traversal of MatrixSearch in a Row Column Sorted MatrixFind the number of islandsBoolean Matrix QuestionCount number of islands in a binary matrixMaximum sum rectangle in a 2D matrixFlood Fill AlgorithmCount Paths in matrixMaximum path sum in matrixRotate a matrix by 90 degreesMinimum steps to reach target by a KnightMinimum cost to fill the weight Shortest path in a Binary MazeHard ProblemsLargest binary sub-matrix with all 1sLargest rectangular area in histogramFind pair in a matrixMaximum size square sub-matrix with all 1sLargest rectangle of 1's with swapping of columns Maximum sum rectangular submatrixMinimum Points to Reach DestinationNumber of paths with at-most k turnsBoolean Matrix Matrix Chain MultiplicationAncestor Matrix from a Given Binary TreePrint K’th element in spiral form of matrixSize of the largest ‘+’ in a binary matrixMaximum sum square sub-matrix of given sizeTic-Tac-Toe Validity Related Articles:DSA TutorialTop 50 Dynamic Programming Coding Problems for InterviewsTop 50 Problems on Linked List for InterviewsTop 50 Problems on Queue for Interviews Comment More info I itsadityash Follow Improve Article Tags : Matrix DSA Interview-Questions Explore DSA FundamentalsLogic Building Problems 2 min read Analysis of Algorithms 1 min read Data StructuresArray Data Structure 3 min read String in Data Structure 2 min read Hashing in Data Structure 2 min read Linked List Data Structure 2 min read Stack Data Structure 2 min read Queue Data Structure 2 min read Tree Data Structure 2 min read Graph Data Structure 3 min read Trie Data Structure 15+ min read AlgorithmsSearching Algorithms 2 min read Sorting Algorithms 3 min read Introduction to Recursion 14 min read Greedy Algorithms 3 min read Graph Algorithms 3 min read Dynamic Programming or DP 3 min read Bitwise Algorithms 4 min read AdvancedSegment Tree 2 min read Binary Indexed Tree or Fenwick Tree 15 min read Square Root (Sqrt) Decomposition Algorithm 15+ min read Binary Lifting 15+ min read Geometry 2 min read Interview PreparationInterview Corner 3 min read GfG160 3 min read Practice ProblemGeeksforGeeks Practice - Leading Online Coding Platform 6 min read Problem of The Day - Develop the Habit of Coding 5 min read Like