PhantomCodeAIPhantomCodeAI
FeaturesMock InterviewDashboardJobsPricing
FeaturesMock InterviewDashboardJobsPricing
PhantomCodeAIPhantomCodeAI
FeaturesMock InterviewDashboardJobsPricing
FeaturesMock InterviewDashboardJobsPricing
HomeLeetCode ProblemsMatrix

Matrix Problems

221 Matrix LeetCode problems · Solve with AI-powered hints & step-by-step explanations.

36Valid SudokuMedium37Sudoku SolverHard48Rotate ImageMedium54Spiral MatrixMedium59Spiral Matrix IIMedium63Unique Paths IIMedium64Minimum Path SumMedium73Set Matrix ZeroesMedium74Search a 2D MatrixMedium79Word SearchMedium85Maximal RectangleHard130Surrounded RegionsMedium174Dungeon GameHard200Number of IslandsMedium212Word Search IIHard221Maximal SquareMedium240Search a 2D Matrix IIMedium289Game of LifeMedium304Range Sum Query 2D - ImmutableMedium329Longest Increasing Path in a MatrixHard363Max Sum of Rectangle No Larger Than KHard378Kth Smallest Element in a Sorted MatrixMedium407Trapping Rain Water IIHard417Pacific Atlantic Water FlowMedium419Battleships in a BoardMedium427Construct Quad TreeMedium463Island PerimeterEasy498Diagonal TraverseMedium529MinesweeperMedium54201 MatrixMedium566Reshape the MatrixEasy661Image SmootherEasy675Cut Off Trees for Golf EventHard695Max Area of IslandMedium733Flood FillEasy741Cherry PickupHard749Contain VirusHard766Toeplitz MatrixEasy773Sliding PuzzleHard778Swim in Rising WaterHard782Transform to ChessboardHard794Valid Tic-Tac-Toe StateMedium803Bricks Falling When HitHard807Max Increase to Keep City SkylineMedium827Making A Large IslandHard832Flipping an ImageEasy835Image OverlapMedium840Magic Squares In GridMedium861Score After Flipping MatrixMedium864Shortest Path to Get All KeysHard867Transpose MatrixEasy883Projection Area of 3D ShapesEasy885Spiral Matrix IIIMedium892Surface Area of 3D ShapesEasy909Snakes and LaddersMedium931Minimum Falling Path SumMedium934Shortest BridgeMedium959Regions Cut By SlashesMedium980Unique Paths IIIHard994Rotting OrangesMedium999Available Captures for RookEasy1020Number of EnclavesMedium1030Matrix Cells in Distance OrderEasy1034Coloring A BorderMedium1072Flip Columns For Maximum Number of Equal RowsMedium1074Number of Submatrices That Sum to TargetHard1091Shortest Path in Binary MatrixMedium1139Largest 1-Bordered SquareMedium1162As Far from Land as PossibleMedium1210Minimum Moves to Reach Target with RotationsHard1219Path with Maximum GoldMedium1222Queens That Can Attack the KingMedium1253Reconstruct a 2-Row Binary MatrixMedium1254Number of Closed IslandsMedium1260Shift 2D GridEasy1263Minimum Moves to Move a Box to Their Target LocationHard1267Count Servers that CommunicateMedium1275Find Winner on a Tic Tac Toe GameEasy1277Count Square Submatrices with All OnesMedium1284Minimum Number of Flips to Convert Binary Matrix to Zero MatrixHard1289Minimum Falling Path Sum IIHard1292Maximum Side Length of a Square with Sum Less than or Equal to ThresholdMedium1293Shortest Path in a Grid with Obstacles EliminationHard1301Number of Paths with Max ScoreHard1314Matrix Block SumMedium1329Sort the Matrix DiagonallyMedium1337The K Weakest Rows in a MatrixEasy1349Maximum Students Taking ExamHard1351Count Negative Numbers in a Sorted MatrixEasy1368Minimum Cost to Make at Least One Valid Path in a GridHard1380Lucky Numbers in a MatrixEasy1391Check if There is a Valid Path in a GridMedium1439Find the Kth Smallest Sum of a Matrix With Sorted RowsHard1444Number of Ways of Cutting a PizzaHard1463Cherry Pickup IIHard1476Subrectangle QueriesMedium1504Count Submatrices With All OnesMedium1536Minimum Swaps to Arrange a Binary GridMedium1559Detect Cycles in 2D GridMedium1568Minimum Number of Days to Disconnect IslandHard1572Matrix Diagonal SumEasy1582Special Positions in a Binary MatrixEasy1591Strange Printer IIHard1594Maximum Non Negative Product in a MatrixMedium1595Minimum Cost to Connect Two Groups of PointsHard1605Find Valid Matrix Given Row and Column SumsMedium1631Path With Minimum EffortMedium1632Rank Transform of a MatrixHard1672Richest Customer WealthEasy1706Where Will the Ball FallMedium1727Largest Submatrix With RearrangementsMedium1728Cat and Mouse IIHard1738Find Kth Largest XOR Coordinate ValueMedium1765Map of Highest PeakMedium1861Rotating the BoxMedium1878Get Biggest Three Rhombus Sums in a GridMedium1886Determine Whether Matrix Can Be Obtained By RotationEasy1895Largest Magic SquareMedium1901Find a Peak Element IIMedium1905Count Sub IslandsMedium1914Cyclically Rotating a GridMedium1926Nearest Exit from Entrance in MazeMedium1937Maximum Number of Points with CostMedium1958Check if Move is LegalMedium1970Last Day Where You Can Still CrossHard1975Maximum Matrix SumMedium1981Minimize the Difference Between Target and Chosen ElementsMedium1992Find All Groups of FarmlandMedium2017Grid GameMedium2018Check if Word Can Be Placed In CrosswordMedium2022Convert 1D Array Into 2D ArrayEasy2033Minimum Operations to Make a Uni-Value GridMedium2088Count Fertile Pyramids in a LandHard2125Number of Laser Beams in a BankMedium2132Stamping the GridHard2133Check if Every Row and Column Contains All NumbersEasy2146K Highest Ranked Items Within a Price RangeMedium2245Maximum Trailing Zeros in a Cornered PathMedium2257Count Unguarded Cells in the GridMedium2258Escape the Spreading FireHard2267 Check if There Is a Valid Parentheses String PathHard2290Minimum Obstacle Removal to Reach CornerHard2304Minimum Path Cost in a GridMedium2319Check if Matrix Is X-MatrixEasy2326Spiral Matrix IVMedium2328Number of Increasing Paths in a GridHard2352Equal Row and Column PairsMedium2373Largest Local Values in a MatrixEasy2392Build a Matrix With ConditionsHard2397Maximum Rows Covered by ColumnsMedium2428Maximum Sum of an HourglassMedium2435Paths in Matrix Whose Sum Is Divisible by KHard2482Difference Between Ones and Zeros in Row and ColumnMedium2500Delete Greatest Value in Each RowEasy2503Maximum Number of Points From Grid QueriesHard2536Increment Submatrices by OneMedium2545Sort the Students by Their Kth ScoreMedium2556Disconnect Path in a Binary Matrix by at Most One FlipMedium2573Find the String with LCPHard2577Minimum Time to Visit a Cell In a GridHard2596Check Knight Tour ConfigurationMedium2614Prime In DiagonalEasy2617Minimum Number of Visited Cells in a GridHard2639Find the Width of Columns of a GridEasy2643Row With Maximum OnesEasy2658Maximum Number of Fish in a GridMedium2661First Completely Painted Row or ColumnMedium2679Sum in a MatrixMedium2684Maximum Number of Moves in a GridMedium2711Difference of Number of Distinct Values on DiagonalsMedium2713Maximum Strictly Increasing Cells in a MatrixHard2732Find a Good Subset of the MatrixHard2812Find the Safest Path in a GridMedium2850Minimum Moves to Spread Stones Over GridMedium2906Construct Product MatrixMedium2923Find Champion IEasy2931Maximum Spending After Buying ItemsHard2946Matrix Similarity After Cyclic ShiftsEasy2965Find Missing and Repeated ValuesEasy3030Find the Grid of Region AverageMedium3033Modify the MatrixEasy3044Most Frequent PrimeMedium3070Count Submatrices with Top-Left Element and Sum Less Than kMedium3071Minimum Operations to Write the Letter Y on a GridMedium3122Minimum Number of Operations to Satisfy ConditionsMedium3127Make a Square with the Same ColorEasy3142Check if Grid Satisfies ConditionsEasy3148Maximum Difference Score in a GridMedium3195Find the Minimum Area to Cover All Ones IMedium3197Find the Minimum Area to Cover All Ones IIHard3212Count Submatrices With Equal Frequency of X and YMedium3225Maximum Score From Grid OperationsHard3239Minimum Number of Flips to Make Binary Grid Palindromic IMedium3240Minimum Number of Flips to Make Binary Grid Palindromic IIMedium3242Design Neighbor Sum ServiceEasy3256Maximum Value Sum by Placing Three Rooks IHard3257Maximum Value Sum by Placing Three Rooks IIHard3276Select Cells in Grid With Maximum ScoreHard3286Find a Safe Walk Through a GridMedium3311Construct 2D Grid Matching Graph LayoutHard3332Maximum Points Tourist Can EarnMedium3341Find Minimum Time to Reach Last Room IMedium3342Find Minimum Time to Reach Last Room IIMedium3363Find the Maximum Number of Fruits CollectedHard3393Count Paths With the Given XOR ValueMedium3402Minimum Operations to Make Columns Strictly IncreasingEasy3417Zigzag Grid Traversal With SkipEasy3418Maximum Amount of Money Robot Can EarnMedium3446Sort Matrix by DiagonalsMedium3459Length of Longest V-Shaped Diagonal SegmentHard3462Maximum Sum With at Most K ElementsMedium3484Design SpreadsheetMedium3529Count Cells in Overlapping Horizontal and Vertical SubstringsMedium3537Fill a Special GridMedium3546Equal Sum Grid Partition IMedium3548Equal Sum Grid Partition IIHard3552Grid Teleportation TraversalMedium3567Minimum Absolute Difference in Sliding SubmatrixMedium3568Minimum Moves to Clean the ClassroomMedium3603Minimum Cost Path with Alternating Directions IIMedium3619Count Islands With Total Value Divisible by KMedium
← Browse all LeetCode problems
PhantomCodeAIPhantomCodeAI
PhantomCodeAI is an undetectable desktop application to help you pass your Leetcode interviews.
All systems online
Download

Legal

Refund PolicyTerms of ServiceCancellation PolicyPrivacy Policy

Pages

Contact SupportHelp CenterInstant SupportFAQBlogFeaturesInterview CopilotCoding CopilotInterview QuestionsPricingMock Interview PricingEarn with UsBest AI Interview Assistants 2026FeedbackLeetcode ProblemsLoginCreate Account

Compare

All 29 comparisons →Why switch (29 alternatives) →Interview Coder AlternativeFinal Round AI AlternativeUltraCode AI AlternativeParakeet AI AlternativeAI Apply AlternativeCoderRank AlternativeInterviewing.io AlternativeShadeCoder Alternative

Resources

Salary GuideResume TemplatesWhat Is PhantomCodeAIIs PhantomCodeAI Detectable?Use PhantomCodeAI in HackerRankvs LeetCode PremiumFor European EngineersFor FAANG Interview PrepPost-Layoff ComebackIndia Pricing (INR)

Interview Types

Coding InterviewSystem Design InterviewDSA InterviewLeetCode InterviewAlgorithms InterviewData Structure InterviewSQL InterviewOnline Assessment

Interview Questions

See all →
GoogleAmazonMetaMicrosoftAppleNetflixStripeUberAirbnbBloombergSoftware EngineerFrontend EngineerBackend EngineerData EngineerML EngineerDevOps EngineerData ScientistEngineering ManagerBehavioralSystem Design

Mock Interview by Round Type

All formats →
Mock Interview HubMock Coding InterviewMock Behavioral InterviewMock System Design

AI for Industry Interviews

All industries →
Sales InterviewsPM InterviewsFinance InterviewsConsulting InterviewsDesign Interviews

Coding Interview Patterns

See all patterns →
Coding Interviews HubDynamic ProgrammingTwo Pointers + Sliding WindowGraph AlgorithmsTree AlgorithmsBinary Search

Interview Guides

See all guides →
How to Ace an InterviewHow to Crack InterviewsBest Interview AnswersScreening Interview QuestionsTelephone Interview TipsWorking Interview ExplainedCracking the PM InterviewFAANG 30-Day RoadmapTop 10 LeetCode PatternsSystem Design Prep GuideSTAR Behavioral MethodBehavioral Interview Qs

Alternatives — why engineers switch

See all 29 →
Interview CoderFinal Round AIParakeet AILockedIn AIUltraCode AIShadeCoderSensei AIVerve AICluelyChatGPTBeyz AIInterview SidekickYoodliAlgoMonsterCoderRankExponentFormationInterviewing.ioInterview CakeBig InterviewInterview KickstartPrampScalerAI ApplyCareerflowJobscanKickresumeTeal HQHireVue

AI Interview Tools

AI Interview AssistantAI Interview CoachAI for Job InterviewsAI Interview Preparation ToolReal-Time AI Interview AnswersInterview AI HelperReal-Time AI Interview AssistantAI Interview BotBest AI Interview Tools 2026AI Interview QuestionsPractice Interview QuestionsAI to Answer Interview QuestionsAI Phone Interview HelpAI Interviewing SoftwareAI Interview HubInterview CopilotAI Coding Interview AssistantMock Interview

© 2026 PhantomCodeAI. All rights reserved.