Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
oleg_kikin
· 15y ago · 0 comments
Yeah, dynamic programming. It's a well known problem. I'm pretty sure you can just convert the matrix to 1s and 0s, and dump it into Matlab.
Comments
[–]
rohananil
15y ago
Is it DP? I think DP is O(N^3)? That will be a funny way(Matlab) to solve this...
[–]
Joshim5
15y ago
Eh, why not just use a flood-fill type algorithm?
[–]
rohananil
15y ago
Wouldn't the constrained that output area should be for a rectangle cause a problem?