An algorithm is shown in Figure 1.
Figure 1
1 SET originalList TO ["North", "East", "South", "West"]
2 SET reversedList TO ["", "", "", ""]
3 SET writePos TO 0
4
5 FOR readPos FROM (LENGTH(originalList) - 1) TO 0 STEP -1 DO
6 SET reversedList[writePos] TO originalList[readPos]
7 SET writePos TO writePos + 1
8 END FOR
State the purpose of the algorithm in Figure 1.