Domanda di colloquio di Intuit

Given two rectangles, how do you determine when they overlap?