Package com.zybooks.dsaj.stackqueue
package com.zybooks.dsaj.stackqueue
Code from the chapter "Stacks, Queues, and Dequeues"
-
ClassDescriptionArrayQueue<E>Implementation of the queue ADT using a fixed-length array.ArrayStack<E>Implementation of the stack ADT using a fixed-length array.This provides one additional method not part of the general Queue interface.Deque<E>Interface for a double-ended queue: a collection of elements that can be inserted and removed at both ends; this interface is a simplified version of java.util.Deque.The classic Josephus problem as a Case study for a CircularQueueRealization of a circular FIFO queue as an adaptation of a CircularlyLinkedList.LinkedDeque<E>Realization of a double-ended queue as an adaptation of a DoublyLinkedList.LinkedQueue<E>Realization of a FIFO queue as an adaptation of a SinglyLinkedList.LinkedStack<E>Realization of a stack as an adaptation of a SinglyLinkedList.Simplified test of matching delimiters in a string.Simplified test of matching tags in an HTML document.Queue<E>Interface for a queue: a collection of elements that are added and removed according to the first-in first-out principle.Case study for using a Stack to reverse a sequence.Stack<E>A collection of objects that are added and removed according to the last-in first-out principle.