TuSimple Interview Question

Compute the intersection over union, given 2 rectangles. For Each rectangle input representation would be topleft vertex and bottom right vertex.

Interview Answer

Anonymous

Dec 3, 2020

Tried answering via the coordinate geometry approach instead of using max. The interviewer was very kind and helped me towards getting the solution. I spent too much time and could not finish it within the given 40 min.

1