Pergunta de entrevista da empresa Autodesk

How to detect if two rectangles overlap?