Datacenter aisle containment relies on calculating the physical volume of cold air trapped between server racks of varying heights. To optimally place the heaviest computing workloads, infrastructure engineers must identify the two server racks across a floor plan that create the largest physical containment zone.
Given an array of server rack heights, choose two racks such that, combined with the floor between them, they form a container that holds the most volume (area). You cannot slant the container. Return the maximum area.
βΆ Run Code to test against examples Β· Submit to judge all 5 test cases