APCON interview question

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

Interview Answer

Anonymous

Jul 17, 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.