Re: [algogeeks] Re: histogram

2012-01-23 Thread shady
http://stackoverflow.com/questions/4311694/maximize-the-rectangular-area-under-histogram it is described here. On Mon, Jan 23, 2012 at 3:16 PM, Ashish Goel wrote: > someone said that the solutionhas been given using the stack, can someone > explain it, i did a lookup in my mail box and the solut

[algogeeks] Re: histogram

2012-01-23 Thread Ashish Goel
someone said that the solutionhas been given using the stack, can someone explain it, i did a lookup in my mail box and the solution for the histogram problem is not there. The gif tells how to proceed, however, not able to map it to how stack to be used. Best Regards Ashish Goel "Think positive a

Re: [algogeeks] Re: Histogram Problem

2011-01-10 Thread Anand
Engish version is available On Mon, Jan 10, 2011 at 11:22 AM, juver++ wrote: > Here is an algorithm for > the finding zero matrix with max area. > It is in Russian, however. > > -- > You received this message because you are subscribed to the Google

[algogeeks] Re: Histogram Problem

2011-01-10 Thread juver++
Here is an algorithm for the finding zero matrix with max area. It is in Russian, however. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googleg

[algogeeks] Re: Histogram Problem

2011-01-10 Thread Decipher
Does anyone know where is the solution to rectangle problem in this group ?? -- 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 algog

[algogeeks] Re: Histogram Problem

2011-01-09 Thread juver++
There is a O(n) solution but with O(n) space using stack. Idea is the same for the problem of finding rectangle of 1's in a matrix with a max area. So for each bar of height H we should know nearest index M of the bar to the left with height < H, and the same to the right hand side - index N. Ar

[algogeeks] Re: Histogram Problem

2010-07-12 Thread Tech Id
You will need width of each bar too perhaps. Why should this need any algo? Just get the one which has maximum height or if width is also given then the one with maximum height x width It is O(n) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" grou