1139. Largest 1-Bordered Square
Problem Link
Let dpVer[i][j] := the number of continuous 1’s from grid[0][j-1] to grid[i-1][j-1]
Let dpHor[i][j] := the number of continuous 1’s from grid[i-1][0] to grid[i-1][j-1]
class Solution:
def largest1BorderedSquare(self, grid: List[List[...
superbcoder.hashnode.dev1 min read