a correct but tle solution for largest rectangle in a histgram.