title: Intersection of N rectangles
body: <p>I'm looking for an algorithm to solve this problem: </p>
  
  <p>Given N rectangles on the Cartesian coordinate, find out if the intersection of those rectangles is empty or not. Each rectangle can lie in any direction (not necessary to have its edges parallel to Ox and Oy)</p>
  
  <p>Do you have any suggestion to solve this problem? :) I can think of testing the intersection of each rectangle pair. However, it's O(N*N) and quite slow :(</p>