阿摩線上測驗 登入

申論題資訊

試卷:104年 - 104 淡江大學 轉學考 資料結構#52975
科目:研究所、轉學考(插大)-資料結構
年份:104年
排序:0

題組內容

3.(20%) Given a doubly linked list which has a header field for the dummy head node and a trailer field for the dummy tail node. Suppose that each node has a next field for the next node and a prev field for the previous node. Please complete the following task with proper pseudo code.

申論題內容

b. What are the steps in sequence for adding a node new_node to the head of the list? (Hint: The condition for an empty list is header . next == trailer or trailer .prev == header.)