References & Citations
Computer Science > Data Structures and Algorithms
Title: A Neat Linked Queue with the Rear Blank Node
(Submitted on 17 May 2021 (v1), last revised 2 Oct 2021 (this version, v3))
Abstract: We introduce a very simple queue implementation with the singly linked list. With the help of the rear blank node instead of the usual header node, we avoid additional check steps for the dequeue operation in the traditional implementations existing for many decades. The essence of our representation is the half-opened pointer interval with the same direction of the queue operations, which can guarantee the uniform treatment even in the empty queue case. The simplification of queue implementations cuts off unnecessary steps, and it minimizes the number of steps in the dequeue operation with the time limitation of enqueue operation, which could contribute to the performance of the real-time systems. We extend the linked queue to the circularly linked queue, which can also be used to implement stack and take advantage of the maximal information of the single direction in the circularly linked list, and it actually constructs the output-restricted deque. We also present a variant: lazy circularly linked queue, which is more efficient in some special cases, especially for the dequeue operations.
Submission history
From: Xie Xie [view email][v1] Mon, 17 May 2021 19:00:42 GMT (4kb)
[v2] Thu, 2 Sep 2021 16:31:55 GMT (7kb)
[v3] Sat, 2 Oct 2021 03:37:52 GMT (6kb)
Link back to: arXiv, form interface, contact.