Pergunta de entrevista da empresa APCON

Write a function that would detect if two rectangular objects overlapped given their x,y and length/width.

Resposta da entrevista

Sigiloso

17 de jul. de 2015

I wrote some pseudo code to solve the problem. if (widthOverlaps(x1,x2,width) && heightOverlaps(y1,y2,height) return true; I started to write the two functions widthOverlaps and heightOverlaps but the interviewer stopped me.