Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2556. Disconnect Path in a Binary Matrix by at Most One Flip
Determine whether flipping at most one non-endpoint cell can eliminate every down/right path from (0,0) to (m-1,n-1) in a binary m×n grid. Because all monotonic paths have the same length, this reduces to checking if the grid is already disconnected or if some intermediate diagonal (r+c) layer has exactly one cell that lies on all s→t paths (a single bottleneck).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.