Each segment is given by two integer points [x, y]. Return true if the segment ab and the segment cd share at least one point.
- Touching counts: an endpoint lying on the other segment, or two segments meeting at an endpoint, both intersect
- Collinear segments intersect when they overlap or touch, and do not when there is a gap between them
- A segment may be a single point, when its two ends are equal
- Coordinates are integers up to
107 in absolute value, so use integer arithmetic only - The answer must not depend on which segment is first or on the order of the endpoints