Autodesk Interview Question

How to detect if two rectangles overlap?