<s>
In	O
computational	O
geometry	O
,	O
the	O
multiple	B-Algorithm
line	I-Algorithm
segment	I-Algorithm
intersection	I-Algorithm
problem	O
supplies	O
a	O
list	O
of	O
line	O
segments	O
in	O
the	O
Euclidean	O
plane	O
and	O
asks	O
whether	O
any	O
two	O
of	O
them	O
intersect	B-Algorithm
(	O
cross	O
)	O
.	O
</s>
<s>
The	O
most	O
common	O
,	O
and	O
more	O
efficient	O
,	O
way	O
to	O
solve	O
this	O
problem	O
for	O
a	O
high	O
number	O
of	O
segments	O
is	O
to	O
use	O
a	O
sweep	B-Algorithm
line	I-Algorithm
algorithm	I-Algorithm
,	O
where	O
we	O
imagine	O
a	O
line	O
sliding	O
across	O
the	O
line	O
segments	O
and	O
we	O
track	O
which	O
line	O
segments	O
it	O
intersects	O
at	O
each	O
point	O
in	O
time	O
using	O
a	O
dynamic	O
data	O
structure	O
based	O
on	O
binary	B-Language
search	I-Language
trees	I-Language
.	O
</s>
<s>
The	O
Shamos	O
–	O
Hoey	O
algorithm	O
applies	O
this	O
principle	O
to	O
solve	O
the	O
line	O
segment	O
intersection	B-Algorithm
detection	O
problem	O
,	O
as	O
stated	O
above	O
,	O
of	O
determining	O
whether	O
or	O
not	O
a	O
set	O
of	O
line	O
segments	O
has	O
an	O
intersection	B-Algorithm
;	O
the	O
Bentley	B-Algorithm
–	I-Algorithm
Ottmann	I-Algorithm
algorithm	I-Algorithm
works	O
by	O
the	O
same	O
principle	O
to	O
list	O
all	O
intersections	B-Algorithm
in	O
logarithmic	O
time	O
per	O
intersection	B-Algorithm
.	O
</s>
