add: 最大正方形
This commit is contained in:
1 parent
431ac87901
commit
3b8d9b3f40
3 files changed
+45
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { maximalSquare } from '../../src/array/maximal-square'
|
||||
|
||||
test('最大正方形', () => {
|
||||
expect(maximalSquare([
|
||||
[1, 0, 1, 0, 0],
|
||||
[1, 0, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1],
|
||||
[1, 0, 0, 1, 0]
|
||||
])).toBe(4)
|
||||
|
||||
expect(maximalSquare([
|
||||
[0, 0, 0],
|
||||
[1, 1, 1]
|
||||
])).toBe(1)
|
||||
})
|
||||
Reference in new issue
Block a user