Overview of data structures and algorithms

Source: Internet
Author: User

1 Overview of data structures
    • A data structure is an arrangement that refers to a computer's memory (or disk).

2 Types of data structures
    • arrays, linked lists, stacks, binary trees, hash tables, and so on.

3 Overview of the algorithm
    • The data in the structure of a variety of processing, such as query, add, delete, modify and so on.

4 application aspects of data structures and algorithms
    • Real-world data storage.
    • Programmer's Tool.
    • Modeling.

5 advantages and disadvantages of common data structures
    • Array:
      • Advantages: Fast insertion, if you know the subscript, can be accessed very quickly.
      • Cons: Find slow, delete slow, fixed size.

    • Ordered array:
      • Pros: Faster than unordered data lookups.
      • Cons: Delete slow, insert slow, fixed size.

    • Stack:
      • Advantages: Provides advanced back-out access.
      • Cons: Accessing other items is slow.

    • Queue:
      • Pros: Provides FIFO access.
      • Cons: Accessing other items is slow.

    • Linked list:
      • Advantages: Quick Insert, quick Delete.
      • Cons: Find Slow,

    • Two-fork Tree:
      • Pros: Find, insert, and delete are faster (if the number remains balanced).
      • Cons: Deleted algorithms are complex.

    • Red-Haishi:
      • Pros: Insert, insert, and delete are quick. The tree is always balanced.
      • Cons: The algorithm is complex.

    • 2-3-4 Tree:
      • Pros: Find, insert, and delete all quickly. The tree is always balanced. Similar trees are useful for disk space storage.
      • Cons: The algorithm is complex.

    • Hash table:
      • Pros: If the keyword is already known, the access is fast. Insert Fast.
      • Disadvantage: Delete slow, if you do not know the housekeeper putty is slow access to storage space use is not sufficient.

    • Heap:
      • Advantages: Fast insertion, fast deletion, and fast access to the largest data items.
      • Disadvantage: Slow access to other items.

    • Figure:
      • Pros: Modeling the real world.
      • Cons: Some algorithms are slow and complex.

Overview of data structures and algorithms

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.