@pramod Arent all the 'n' chords part of the same circle ? If they are how can they be parallel without intersecting. If they are not of the same circle then its a different problem.
@Karthik The complexity is not O(n). It is O(nlg(n)), since my first step is sorting the chords. Also you are doing essentially the same thing sorting, but instead of doing it at first, you are inserting stuff at each step of your algo. -Dhyanesh On 4/25/06, pramod <[EMAIL PROTECTED]> wrote: > > I don't think this will work. > Suppose we have two chords which are parallel and both on the one side > of the circle. i.e., say draw a diameter parallel to X and say the > chords are above this parallel to each other. > In that case, your answer will be 1 but they are not intersecting at > all. I think your statement "if you get another start point it means > there is an intersection" is not correct. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---