Intersection of N rectangles

前端 未结 6 522
野趣味
野趣味 2020-12-25 15:18

I\'m looking for an algorithm to solve this problem:

Given N rectangles on the Cartesian coordinate, find out if the intersection of those rectangles is empty or no

6条回答
  •  春和景丽
    2020-12-25 15:52

    I think you should use something like the sweep line algorithm: finding intersections is one of its applications. Also, have a look at answers to this questions

提交回复
热议问题