Goldman Sachs Interview Question

Calculate minimum and maximum area.