Amazon Interview Question

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