Valve Corporation interview question

Calculate distance between two axis-aligned rectangles