LC 85 - Maximal Rectangle
Approach Today’s daily can be solved with the technique as mono-stack in LC-84. First, we calculate the continuous 1 in the horizontal direction (only need to calculate one side). For instance, given 0 1 1 0 0 1 1 1 we have 0 1 2 0 0 1 2 3 denoting how many ones are there, and then we process each vertical direction as it is a histogram (as LC-84). ...