← back

Matrix

227 questions · 0 seen

All Matrix problems

Problems

⊣ 36 Valid Sudoku
⊣ 37 Sudoku Solver
⊣ 48 Rotate Image
⊣ 54 Spiral Matrix
⊣ 59 Spiral Matrix II
⊣ 63 Unique Paths II
⊣ 64 Minimum Path Sum
⊣ 73 Set Matrix Zeroes
⊣ 74 Search a 2D Matrix
⊣ 79 Word Search
⊣ 85 Maximal Rectangle
⊣ 130 Surrounded Regions
⊣ 174 Dungeon Game
⊣ 200 Number of Islands
⊣ 212 Word Search II
⊣ 221 Maximal Square
⊣ 240 Search a 2D Matrix II
⊣ 289 Game of Life
⊣ 304 Range Sum Query 2D - Immutable
⊣ 329 Longest Increasing Path in a Matrix
⊣ 363 Max Sum of Rectangle No Larger Than K
⊣ 378 Kth Smallest Element in a Sorted Matrix
⊣ 407 Trapping Rain Water II
⊣ 417 Pacific Atlantic Water Flow
⊣ 419 Battleships in a Board
⊣ 427 Construct Quad Tree
⊣ 463 Island Perimeter
⊣ 498 Diagonal Traverse
⊣ 529 Minesweeper
⊣ 542 01 Matrix
⊣ 566 Reshape the Matrix
⊣ 661 Image Smoother
⊣ 675 Cut Off Trees for Golf Event
⊣ 695 Max Area of Island
⊣ 733 Flood Fill
⊣ 741 Cherry Pickup
⊣ 749 Contain Virus
⊣ 766 Toeplitz Matrix
⊣ 773 Sliding Puzzle
⊣ 778 Swim in Rising Water
⊣ 782 Transform to Chessboard
⊣ 794 Valid Tic-Tac-Toe State
⊣ 803 Bricks Falling When Hit
⊣ 807 Max Increase to Keep City Skyline
⊣ 827 Making A Large Island
⊣ 832 Flipping an Image
⊣ 835 Image Overlap
⊣ 840 Magic Squares In Grid
⊣ 861 Score After Flipping Matrix
⊣ 864 Shortest Path to Get All Keys
⊣ 867 Transpose Matrix
⊣ 883 Projection Area of 3D Shapes
⊣ 885 Spiral Matrix III
⊣ 892 Surface Area of 3D Shapes
⊣ 909 Snakes and Ladders
⊣ 931 Minimum Falling Path Sum
⊣ 934 Shortest Bridge
⊣ 959 Regions Cut By Slashes
⊣ 980 Unique Paths III
⊣ 994 Rotting Oranges
⊣ 999 Available Captures for Rook
⊣ 1020 Number of Enclaves
⊣ 1030 Matrix Cells in Distance Order
⊣ 1034 Coloring A Border
⊣ 1072 Flip Columns For Maximum Number of Equal Rows
⊣ 1074 Number of Submatrices That Sum to Target
⊣ 1091 Shortest Path in Binary Matrix
⊣ 1139 Largest 1-Bordered Square
⊣ 1162 As Far from Land as Possible
⊣ 1210 Minimum Moves to Reach Target with Rotations
⊣ 1219 Path with Maximum Gold
⊣ 1222 Queens That Can Attack the King
⊣ 1253 Reconstruct a 2-Row Binary Matrix
⊣ 1254 Number of Closed Islands
⊣ 1260 Shift 2D Grid
⊣ 1263 Minimum Moves to Move a Box to Their Target Location
⊣ 1267 Count Servers that Communicate
⊣ 1275 Find Winner on a Tic Tac Toe Game
⊣ 1277 Count Square Submatrices with All Ones
⊣ 1284 Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
⊣ 1289 Minimum Falling Path Sum II
⊣ 1292 Maximum Side Length of a Square with Sum Less than or Equal to Threshold
⊣ 1293 Shortest Path in a Grid with Obstacles Elimination
⊣ 1301 Number of Paths with Max Score
⊣ 1314 Matrix Block Sum
⊣ 1329 Sort the Matrix Diagonally
⊣ 1337 The K Weakest Rows in a Matrix
⊣ 1349 Maximum Students Taking Exam
⊣ 1351 Count Negative Numbers in a Sorted Matrix
⊣ 1368 Minimum Cost to Make at Least One Valid Path in a Grid
⊣ 1380 Lucky Numbers in a Matrix
⊣ 1391 Check if There is a Valid Path in a Grid
⊣ 1439 Find the Kth Smallest Sum of a Matrix With Sorted Rows
⊣ 1444 Number of Ways of Cutting a Pizza
⊣ 1463 Cherry Pickup II
⊣ 1476 Subrectangle Queries
⊣ 1504 Count Submatrices With All Ones
⊣ 1536 Minimum Swaps to Arrange a Binary Grid
⊣ 1559 Detect Cycles in 2D Grid
⊣ 1568 Minimum Number of Days to Disconnect Island
⊣ 1572 Matrix Diagonal Sum
⊣ 1582 Special Positions in a Binary Matrix
⊣ 1591 Strange Printer II
⊣ 1594 Maximum Non Negative Product in a Matrix
⊣ 1595 Minimum Cost to Connect Two Groups of Points
⊣ 1605 Find Valid Matrix Given Row and Column Sums
⊣ 1631 Path With Minimum Effort
⊣ 1632 Rank Transform of a Matrix
⊣ 1672 Richest Customer Wealth
⊣ 1706 Where Will the Ball Fall
⊣ 1727 Largest Submatrix With Rearrangements
⊣ 1728 Cat and Mouse II
⊣ 1738 Find Kth Largest XOR Coordinate Value (PRO)
⊣ 1765 Map of Highest Peak
⊣ 1861 Rotating the Box
⊣ 1878 Get Biggest Three Rhombus Sums in a Grid
⊣ 1886 Determine Whether Matrix Can Be Obtained By Rotation (PRO)
⊣ 1895 Largest Magic Square (PRO)
⊣ 1901 Find a Peak Element II
⊣ 1905 Count Sub Islands
⊣ 1914 Cyclically Rotating a Grid (PRO)
⊣ 1926 Nearest Exit from Entrance in Maze
⊣ 1937 Maximum Number of Points with Cost
⊣ 1958 Check if Move is Legal (PRO)
⊣ 1970 Last Day Where You Can Still Cross (PRO)
⊣ 1975 Maximum Matrix Sum
⊣ 1981 Minimize the Difference Between Target and Chosen Elements
⊣ 1992 Find All Groups of Farmland (PRO)
⊣ 2017 Grid Game
⊣ 2018 Check if Word Can Be Placed In Crossword
⊣ 2022 Convert 1D Array Into 2D Array
⊣ 2033 Minimum Operations to Make a Uni-Value Grid
⊣ 2088 Count Fertile Pyramids in a Land
⊣ 2125 Number of Laser Beams in a Bank
⊣ 2132 Stamping the Grid
⊣ 2133 Check if Every Row and Column Contains All Numbers
⊣ 2146 K Highest Ranked Items Within a Price Range
⊣ 2245 Maximum Trailing Zeros in a Cornered Path
⊣ 2257 Count Unguarded Cells in the Grid
⊣ 2258 Escape the Spreading Fire
⊣ 2267 Check if There Is a Valid Parentheses String Path
⊣ 2290 Minimum Obstacle Removal to Reach Corner
⊣ 2304 Minimum Path Cost in a Grid
⊣ 2319 Check if Matrix Is X-Matrix
⊣ 2326 Spiral Matrix IV
⊣ 2328 Number of Increasing Paths in a Grid
⊣ 2352 Equal Row and Column Pairs
⊣ 2373 Largest Local Values in a Matrix
⊣ 2392 Build a Matrix With Conditions
⊣ 2397 Maximum Rows Covered by Columns
⊣ 2428 Maximum Sum of an Hourglass
⊣ 2435 Paths in Matrix Whose Sum Is Divisible by K
⊣ 2482 Difference Between Ones and Zeros in Row and Column
⊣ 2500 Delete Greatest Value in Each Row
⊣ 2503 Maximum Number of Points From Grid Queries
⊣ 2536 Increment Submatrices by One
⊣ 2545 Sort the Students by Their Kth Score
⊣ 2556 Disconnect Path in a Binary Matrix by at Most One Flip
⊣ 2573 Find the String with LCP
⊣ 2577 Minimum Time to Visit a Cell In a Grid
⊣ 2596 Check Knight Tour Configuration
⊣ 2614 Prime In Diagonal
⊣ 2617 Minimum Number of Visited Cells in a Grid
⊣ 2639 Find the Width of Columns of a Grid
⊣ 2643 Row With Maximum Ones
⊣ 2658 Maximum Number of Fish in a Grid
⊣ 2661 First Completely Painted Row or Column
⊣ 2679 Sum in a Matrix
⊣ 2684 Maximum Number of Moves in a Grid
⊣ 2711 Difference of Number of Distinct Values on Diagonals
⊣ 2713 Maximum Strictly Increasing Cells in a Matrix
⊣ 2732 Find a Good Subset of the Matrix
⊣ 2812 Find the Safest Path in a Grid
⊣ 2850 Minimum Moves to Spread Stones Over Grid
⊣ 2906 Construct Product Matrix
⊣ 2923 Find Champion I
⊣ 2931 Maximum Spending After Buying Items
⊣ 2946 Matrix Similarity After Cyclic Shifts
⊣ 2965 Find Missing and Repeated Values
⊣ 3030 Find the Grid of Region Average
⊣ 3033 Modify the Matrix
⊣ 3044 Most Frequent Prime
⊣ 3070 Count Submatrices with Top-Left Element and Sum Less Than k
⊣ 3071 Minimum Operations to Write the Letter Y on a Grid
⊣ 3122 Minimum Number of Operations to Satisfy Conditions
⊣ 3127 Make a Square with the Same Color
⊣ 3142 Check if Grid Satisfies Conditions
⊣ 3148 Maximum Difference Score in a Grid
⊣ 3195 Find the Minimum Area to Cover All Ones I
⊣ 3197 Find the Minimum Area to Cover All Ones II
⊣ 3212 Count Submatrices With Equal Frequency of X and Y
⊣ 3225 Maximum Score From Grid Operations
⊣ 3239 Minimum Number of Flips to Make Binary Grid Palindromic I
⊣ 3240 Minimum Number of Flips to Make Binary Grid Palindromic II
⊣ 3242 Design Neighbor Sum Service
⊣ 3256 Maximum Value Sum by Placing Three Rooks I
⊣ 3257 Maximum Value Sum by Placing Three Rooks II
⊣ 3276 Select Cells in Grid With Maximum Score
⊣ 3286 Find a Safe Walk Through a Grid
⊣ 3311 Construct 2D Grid Matching Graph Layout
⊣ 3332 Maximum Points Tourist Can Earn
⊣ 3341 Find Minimum Time to Reach Last Room I
⊣ 3342 Find Minimum Time to Reach Last Room II
⊣ 3363 Find the Maximum Number of Fruits Collected
⊣ 3393 Count Paths With the Given XOR Value
⊣ 3402 Minimum Operations to Make Columns Strictly Increasing
⊣ 3417 Zigzag Grid Traversal With Skip
⊣ 3418 Maximum Amount of Money Robot Can Earn
⊣ 3446 Sort Matrix by Diagonals
⊣ 3459 Length of Longest V-Shaped Diagonal Segment
⊣ 3462 Maximum Sum With at Most K Elements
⊣ 3484 Design Spreadsheet
⊣ 3529 Count Cells in Overlapping Horizontal and Vertical Substrings
⊣ 3537 Fill a Special Grid
⊣ 3546 Equal Sum Grid Partition I
⊣ 3548 Equal Sum Grid Partition II
⊣ 3552 Grid Teleportation Traversal
⊣ 3567 Minimum Absolute Difference in Sliding Submatrix
⊣ 3568 Minimum Moves to Clean the Classroom
⊣ 3603 Minimum Cost Path with Alternating Directions II
⊣ 3619 Count Islands With Total Value Divisible by K
⊣ 3643 Flip Square Submatrix Vertically
⊣ 3651 Minimum Cost Path with Teleportations
⊣ 3665 Twisted Mirror Path Count
⊣ 3725 Count Ways to Choose Coprime Integers from Rows
⊣ 3742 Maximum Path Score in a Grid
⊣ 3797 Count Routes to Climb a Rectangular Grid