2 下列程式虛擬碼(pseudo code)是要用來從一個非空串列(non-empty list)裡找出最大的數字。請問這個虛擬碼能否正確執行,並解釋你的答案。(12 分)TestValue ← first list entry;
CurrentEntry ← first list entry;
While (CurrentEntry is not the last entry) do {
if (CurrentEntry > TestValue)
then (TestValue ← CurrentEntry)
CurrentEntry ← the next list entry }