Pregunta de entrevista de Microsoft

How do you check if two rectangles are overlapping?