JavaScript data structures and algorithms--stacks

Source: Internet
Author: User

Objective:

Stacks are similar to a list of data structures, but the stack is characterized by ' descendants first out '. Stacks are an efficient data structure, because data can only be added or deleted at the top of the stack, so this is fast and easy to implement.

1. Introduction of the Stack:

A stack is a special list of elements that can only be accessed by one end of the list, called the top of the stack, and the other end as the bottom of the stack. For example, the restaurant Luo Plate, only from the top of the plate, the plate washed clean, but also only Luo in the top. Stacks are called first-in -A-out (LIFO) data structures.

:

JavaScript data structures and algorithms--stacks

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.