โ† Snapdeal questions

Determine whether two line segments intersect

Filed under Snapdeal

The question

Given the coordinates of four endpoints representing two line segments A(x1, y1, x2, y2) and B(x3, y3, x4, y4), write a program to check if the two line segments intersect.

No write-up yet. Related questions below have one.

Related Snapdeal questions

Collected from public candidate posts and coding forums. Updated Nov 2026.