Java record-51-stack and queue

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.