Pergunta de entrevista da empresa Google

Implement the overlap area of two rectangles.