Pergunta de entrevista da empresa Amazon

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