阿摩線上測驗 登入

申論題資訊

試卷:96年 - 096年第二次司法人員資料結構#55836
科目:公職◆資料結構
年份:96年
排序:0

題組內容

五、在下列之雙向鏈結串列(doubly linked list)的插入及刪除副程式中,依序填入空白 位置,下圖為串列之示意圖。(20 分)list-insert(L, x) { next[x] ← head[L] if head[L]≠NIL then (1) ; head[L] ← x( 2) ; } list-delete(L, x) { if prev[x]≠NIL then (3) ; else head[L] ← next[x] if next[x]≠NIL then (4) ; }

申論題內容

2