Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit be4a27b

Browse files
aQuaaQua
aQua
authored and
aQua
committed
221 accepted. 72ms > 3ms
1 parent 24f780e commit be4a27b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Algorithms/0221.maximal-square/maximal-square.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ func maximalSquare(matrix [][]byte) int {
5959
return
6060
}
6161

62-
if j-b >= i-a {
62+
if i-a <= j-b {
6363
push(i, j+1)
6464
}
65-
if i == j {
65+
if i-a == j-b {
6666
push(i+1, j+1)
6767
}
6868
if i-a >= j-b {

0 commit comments

Comments
 (0)