---
title: "Discussion on \"1139. Largest 1-Bordered Square\" | Hashnode"
description: "Discussion on \"1139. Largest 1-Bordered Square\". Problem Link\nLet dpVer[i][j] := the number of continuous 1’s from grid[0][j-1] to grid[i-1][j-1]\nLet dpHor[i][j] := the number of continuous 1’s from grid[i-1][0] to grid[i-1][j-1]\nclass Solution:\n    def largest1BorderedSquare(self, grid: List[List[..."
url: "https://hashnode.com/posts/1139-largest-1-bordered-square/629e29c84d2584547c17d5cc"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [1139\. Largest 1-Bordered Square](https://superbcoder.hashnode.dev/1139-largest-1-bordered-square?utm_source=hashnode&utm_medium=feed)

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\[...

Jun 6, 2022 · 1 min read · superbcoder.hashnode.dev  
Updated Jun 17, 2022  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#array](https://hashnode.com/tag/array)
-   [#dynamic-programming](https://hashnode.com/tag/dynamic-programming)

## Written by

[Jim Chung](https://hashnode.com/@JimHYC)

@JimHYC

  
[View profile](https://hashnode.com/@JimHYC)

Leetcode

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
