Considering one column at a time as the point of reference, Hedge can look to the left stack by stack to find the height of the tallest one, look to the right to find the height of the tallest one, and take the smaller of the two as the height the energy can fill up to.