<s>
In	O
computer	B-General_Concept
science	I-General_Concept
(	O
specifically	O
computational	O
complexity	O
theory	O
)	O
,	O
the	O
worst-case	B-General_Concept
complexity	I-General_Concept
(	O
It	O
is	O
denoted	O
by	O
Big-oh(n )	O
)	O
measures	O
the	O
resources	B-General_Concept
(	O
e.g.	O
</s>
<s>
running	O
time	O
,	O
memory	B-General_Concept
)	O
that	O
an	O
algorithm	O
requires	O
given	O
an	O
input	O
of	O
arbitrary	O
size	O
(	O
commonly	O
denoted	O
as	O
in	O
asymptotic	O
notation	O
)	O
.	O
</s>
<s>
It	O
gives	O
an	O
upper	O
bound	O
on	O
the	O
resources	B-General_Concept
required	O
by	O
the	O
algorithm	O
.	O
</s>
<s>
linear	O
,	O
logarithmic	O
)	O
of	O
the	O
worst-case	B-General_Concept
complexity	I-General_Concept
is	O
commonly	O
used	O
to	O
compare	O
the	O
efficiency	B-General_Concept
of	O
two	O
algorithms	O
.	O
</s>
<s>
The	O
worst-case	B-General_Concept
complexity	I-General_Concept
of	O
an	O
algorithm	O
should	O
be	O
contrasted	O
with	O
its	O
average-case	O
complexity	O
,	O
which	O
is	O
an	O
average	O
measure	O
of	O
the	O
amount	O
of	O
resources	B-General_Concept
the	O
algorithm	O
uses	O
on	O
a	O
random	O
input	O
.	O
</s>
<s>
Consider	O
performing	O
insertion	B-Algorithm
sort	I-Algorithm
on	O
numbers	O
on	O
a	O
random	B-Application
access	I-Application
machine	I-Application
.	O
</s>
<s>
However	O
,	O
the	O
input	O
in	O
the	O
worst-case	O
for	O
the	O
algorithm	O
is	O
when	O
the	O
numbers	O
are	O
reverse	O
sorted	O
and	O
it	O
takes	O
steps	O
to	O
sort	O
them	O
;	O
therefore	O
the	O
worst-case	O
time-complexity	O
of	O
insertion	B-Algorithm
sort	I-Algorithm
is	O
of	O
.	O
</s>
