An algorithm is designed to reverse the order of elements in an array.
Scores = [15, 3, 9, 7, 18]
Count = 0
Size = 4
Limit = 2
Temp = 0
WHILE Count < Limit
Temp = Scores[Count]
Scores[Count] = Scores[Size - Count]
Scores[Size - Count] = Temp
Count = Count + 1
ENDWHILE
Complete the trace table below for this algorithm. You may not need to use all of the empty rows.
| Count | Size | Limit | Temp | Scores[0] | Scores[1] | Scores[2] | Scores[3] | Scores[4] |
|---|---|---|---|---|---|---|---|---|
| 0 | 4 | 2 | 0 | 15 | 3 | 9 | 7 | 18 |