Y
Hacker News
new
|
ask
|
show
|
jobs
by
rohananil
5427 days ago
there is O(m*n) solution for problem 1.
1 comments
oleg_kikin
5427 days ago
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.
link
rohananil
5427 days ago
Is it DP? I think DP is O(N^3)? That will be a funny way(Matlab) to solve this...
link
Joshim5
5426 days ago
Eh, why not just use a flood-fill type algorithm?
link
rohananil
5426 days ago
Wouldn't the constrained that output area should be for a rectangle cause a problem?
link