Pregunta de entrevista de State Farm

Coding question was about figuring out if two rectangles intersect.