maximal rectangle, two round traversal