資料結構›Ch4 鏈結串列
第 9 題/共 22 題
◀ DS 9/22
9. Linked List、複雜度分析、Tail Pointer
#DS-04-009易Linked List複雜度分析Tail Pointer

There is a linked-list with nn elements, which are x1,x2,…,xnx_1,x_2,\ldots,x_n. Let f(n)f(n) be the time complexity of inserting a new element xn+1x_{n+1} to the tail of the list, and g(n)g(n) be that of deleting the last element xnx_n. If there is only one pointer pointed to the head of the list, we know to access the list is time-consuming, and functions f(n)f(n) and g(n)g(n) are denoted as f1(n)f_1(n) and g1(n)g_1(n) in this case. To improve it, we may also add another pointer pointed to the tail of it, so the functions f(n)f(n) and g(n)g(n) become f2(n)f_2(n) and g2(n)g_2(n). Which of the following option is false if nn becomes large.

📄 台大110
跳轉到第題
▤完整推導請見《WH 資工筆記 · 資料結構》Ch4 鏈結串列
本章題號 · 1–20 / 22