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.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.