Study the following pseudocode algorithm which performs a binary search on a sorted array.
arr = [3, 7, 10, 15, 21, 28, 32, 40]
target = 32
low = 0
high = 7
found = False
while low <= high and found == False do
mid = (low + high) DIV 2
if arr[mid] == target then
found = True
else if arr[mid] < target then
low = mid + 1
else
high = mid - 1
endif
endwhile
Complete the trace table below to show the execution of this algorithm. Some initial values have been entered for you.
| target | low | high | mid | found |
|---|---|---|---|---|
| 32 | 0 | 7 | False | |