Interview question

Revision en1, by tsvk, 2024-06-30 13:23:46

You are given a list of coordinates that represent the bottom left and top right coordinates of the rectangle. You have to find a line parallel to the y-axis which will divide all the rectangles into 2 equal halves.

Overlapping is allowed....

I gave an approach but interviewer didn't seem convinced. Can you guys share any approaches?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English tsvk 2024-06-30 13:23:46 361 Initial revision (published)