Given n line segments, find if any two segments intersect
Given n line segments (p1, q1), (p2, q2), ... (pn, qn), find if the given line segments intersect with each other or not. Example: Input: {{1, 5}, {4, 5}}, {{2, 5}, {10, 1}},{{3, 2}, {10, 3}},{{6, 4}, {9, 4}},{{7, 1}, {8, 1}}Output: 2Explanation: Lines {{1, 5}, {4, 5}}, {{2, 5}, {10, 1}} are interse