How to find the largest rectangle in a histogram?