Java record-51-stack and queue
Stack and Queue Stack (Stack): Stack is also a special linear table, which is a post-import, first-out (LIFO) structure. Stack is a linear table that only inserts and deletes operations at the end of a table. The end of a table is called the top table and the header is called the bottom table ). The stack physical storage can use the sequential storage structure or the chained storage structure. Queue: a Queue defines that all inserts can only be performed at one end of the table, and all deletions are linear tables at the other end of the table. The end that can be inserted in the table is called the Rear, and the end that can be deleted is called the Front ). Queue operations are performed based on the FIFO principle. The physical storage structure of a queue can be sequential or chained. Both the stack and the queue maintain a member variable used to store the elements in the stack or queue. This member variable is generally implemented using the consumer list, and the stack or queue method is implemented based on the consumer list method.