[algogeeks] Largest rectangle in a binary matrix

2010-12-08 Thread Prims
Hi

Given a binary matrix containing  0s and 1s as elements in it. I need
to find efficiently the largest rectangle containing all 1s.

For example: in case of 4x4 matrix

  1 0 0 1
  0 1 1 0
  1 1 1 0
  0 1 1 1

The largest rectangle is

1 1
1 1
1 1

-Prims

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Largest rectangle in a binary matrix

2010-12-08 Thread GOBIND KUMAR
Hi,
Solution is available at http://geeksforgeeks.org/?p=6257

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Largest rectangle in a binary matrix

2010-12-08 Thread ravi teja
Use kadane's 3D algorithm

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Largest Rectangle in a binary Matrix:

2010-10-07 Thread malli

Largest Rectangle in a Matrix:

Given an n by n matrix with zeros and ones, find the largest sub-
matrix full of ones in linear time.  I was told that a solution with
O(n) time complexity exists. If there are n^2 elements in a n X n
matrix how does a linear solution exist?

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.