Stack
Stack ("sut-tak-khoh") sī chi̍t khoán data kò͘-chō, kî-tiong hông sóa cháu ê chi̍t hāng goân-kiāⁿ sī siāng bóe chhah-ji̍p ê hit hāng, ia̍h chiō sī siāng-bóe ji̍p--lâi-ê tāi-seng sóa--chhut-khì.
Chhah-ji̍p (insert) ê chhau-chok, tī stack it-poaⁿ sī kiò chò push ("sak"); thâi-tiāu (delete) ê chhau-chok hō chò pop.
Nā tùi khang ê stack chò pop chhau-chok ê sî, su̍t-gú kóng hit-ê stack tng underflow, chèng-siông lâi kóng sī chò chhò-gō͘ (error) chhù-lí. Nā sī stack ê hāng-bo̍k sò͘-liōng chhiau-kòe tēng hó ê chè-hān, tio̍h kóng hit-ê stack í-keng overflow.
Chham-khó
siu-kái- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest & Clifford Stein (2009). Introduction to Algorithms (Tē-3 pán.). The MIT Press. pp. 232–235. ISBN 9780262259460.
Siong-koan
siu-káiPún bûn-chiuⁿ sī chi̍t phiⁿ phí-á-kiáⁿ. Lí thang tàu khok-chhiong lâi pang-chō͘ Wikipedia. |