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.
翻译:我们引入了与单项链接列表的非常简单的队列执行 。 在后空节点而不是通常的页眉节点的帮助下, 我们避免了对传统执行中已有数十年的传统执行中的卸排操作的额外检查步骤 。 我们的代表面的精髓是半打开的指针间隔, 其方向与队列操作的方向相同, 这可以保证即使在空的队列案例中也实行统一的处理 。 简化队列执行会减少不必要的步骤, 并会将降排操作中的步骤数量减少到最小, 其时间限制为 enqueue 操作, 这可能会促进实时系统的运行 。 我们将连接的队列扩大到循环连接的队列, 也可以用来执行堆叠, 利用循环链接列表中单一方向的最大信息, 并且它实际上构建了输出限制的队列 。 我们还提出了一个变式: 懒惰的循环连接队列, 在某些特殊情况下, 特别是在降排队操作中, 更有效率 。