Let S be a set of n axis-parallel rectangles in the plane, so that the bottom edge of each rectangle in S lies on the x-axis.Find the area of the union of rectangles I am stuck on this problem ,from net I learnt it uses some sweep line algo but how do I implement it