Nuvalence Interview Question

Write an api for overlapping rectangles.