1、为什么不能用数组实现队列
因为用数组实现元素个数是固定的,不便于插入和删除。因此,用链表实现更合适。

2、链表结构
注意点:
In a single linked list, the address of the first node is always stored in a reference node known as “front” (Some times it is also known as “head”).

头指针 *front 存储第一个节点的地址。
没有 *rear 尾指针

Data Sturcture --- Linked list

相关文章: