Basic concepts of data structures and algorithms

Source: Internet
Author: User

Data structure: The way in which it is arranged in the computer's storage space.

Algorithms: Software programs manipulate the data processes of these structures.

Data structure Type
1. Arrays:
Advantages: Fast insertion, direct subscript can be accessed quickly.
Cons: Find slow, delete slow, fixed size.
2. Ordered arrays:
Pros: Faster than no need for array lookups.
Cons: Delete and insert slow, fixed size.
3. Stack:
Advantage: Provides access to the last-in, first-out way.
Cons: Accessing other items is slow
4. Queue:
Advantages: Provide first-in, out-of-the-way access.
Cons: Accessing other items is slow.
5. Linked list:
Pros: Insert fast, delete fast.
Cons: Find slow.
62 Fork Tree:
Pros: Find, INSERT, delete all fast. (such as fruit trees to maintain balance)
Cons: The removal algorithm is complex.
7. Red-Haishi:
Pros: Find, INSERT, delete all fast. And the tree is always balanced.
Cons: The algorithm is complex.
8.2-3-4 Tree:
Pros: Find, INSERT, delete all fast. The tree is always balanced, and similar numbers are useful for disk storage.
Cons: The algorithm is complex.
9. Hash Table:
Advantage: If the keyword is known, the access is extremely fast and the insertion speed
Cons: Delete slow, if you do not know the keyword access is slow, the use of storage space is not sufficient.
10. Heap:
Advantages: Insert, delete fast, access to the largest data item quickly.
Disadvantage: Slow access to other data items.
11. Figure:
Pros: Modeling the real world.
Cons: Some algorithms are slow and complex.

An overview of the algorithm

1. Insert the data.

2. Find the data.

3. Delete the data.

Basic concepts 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.