lua隊列

初始化linked list並打印:
ide

list = {next = nil, value = 1}lua

for i=1,5 dospa

local l = {}orm

l.next = listit

l.value = i+1io

list = lclass

endnext

while list dotab

print(list.value)di

list=list.next

end


結果

---------- lua ----------

6

5

4

3

2

1


Output completed (0 sec consumed) - Normal Termination

相關文章
相關標籤/搜索