 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
n |
If the loop body
is not executed at all, and point
|
|
|
(d) is reached
with low == 0 and high ==
|
|
|
-1.
|
|
|
n |
If the loop body
is performed, at line 6, low <=
|
|
mid <=
high.
|
|
|
n |
low <=
high becomes false only if
|
|
|
|
u |
mid ==
high and low is set to mid + 1
|
|
|
or
|
|
|
|
u |
low ==
mid and high is set to mid - 1
|
|
|
|
u |
In each case, low == high + 1
when
|
|
|
the loop is
exited.
|
|