Question d’entretien chez Amazon

Write a function to allocated two dimensional rectangles within a larger area.