Maximum rectangle size problems: 1D and 2D