Given n line segments on the plane which are either vertical or horizontal. How to count intersections between these line segments?
I have seen solutions involving sweeping line methods. But I need a divide and conquer method. Basically i want to know if we divide the plane vertically into two subplanes and then try to solve the questions on both planes, do we have to take some special step in merging?
Would there be any special advantage of using divide and conqu开发者_Go百科er in this problem ?
The only special steps would be handling vertical lines on the division line, and breaking divided horizontal line segments.
精彩评论