Cse2012 PPS9 w2022
Cse2012 PPS9 w2022
1
8. Given the coordinates of the end points of n line segments, design an
algorithm to retrun the line segments which intersect. If more than one
pair of line-segments intersect, your algorithm should return all such pairs.
Analyse your algorithm with the time complexity.
9. Given the coordinates of n points, design an algorithm to decide whether
the given n points form a simple polygon or not. Analyse your algorithm
with the time complexity.
10. Given the coordinates of the vertices p1 , p2 , ..., pn of a simple polygon P ,
design an algorithm to check whether the given polygon P is convex or
not. Analyse your algorithm with the time complexity.