Outline of Data Structure Learning notes

Source: Internet
Author: User

Recommended learning reference books:

Entity textbooks: 1. Textbooks edited by Yan Weimin and Wu Weimin (all pseudo algorithms)

Implementation Code: Gao Yifan

Data Structure Overview

Definition:
How can we store a large number of complex problems in reality in a specific data type and a specific storage structure to the primary storage (memory) and the operations performed to implement a function (such as searching for an element, deleting an element, and sorting all elements) are called algorithms.

Data Structure = relationship between individuals and individuals
Algorithm = operations on data storage

Algorithm
Solutions and standards

Measure algorithm standards

1. Time Complexity: the approximate number of times the program is executed, not the execution time.

2. space complexity: The maximum memory occupied during Algorithm Execution.

3. Difficulty level: easy to read and understand

4. Robustness:

Data structure status:

Data structure is the core course in Software

Program = Data Storage + Data Operations + languages that can be executed by computers
 


Prerequisites

Pointer
Pointer importance:
Pointer is the soul of C Language

Definition:
Address:
The address is the number of the memory unit.
Non-negative integer starting from 0
Value Range: 0--ffffff (0--4g-1)
Pointer:
The pointer is the address, and the address is the pointer.
Variable that stores the memory unit address when the pointer variable is used
The essence of a pointer is a non-negative integer restricted by operations.
Category:
1. pointer of the basic type

2. Relationship between pointers and Arrays

Struct

Why does struct appear?
To represent some complex data, common basic type variables cannot represent
What is struct?
Struct is a composite data type defined by the user based on actual needs.
How to use struct?
Two methods:
Struct student st ={ 1000, "zhangsan", 20 };
Struct student * PST = & St;
Method 1:
St. Sid
Method 2:
PST-> Sid
Indicates the SID member in the struct variable pointed to by PST.
Notes
1. struct variables cannot be used for addition, subtraction, multiplication, and division, but can be assigned values to each other.
2. Common struct variables and struct pointer variables as function parameters

Dynamic Memory Allocation and release



Module 1: linear structure (put all nodes in a straight line .)

Continuous storage [array]
 
1. What is array?
Same element type, equal size
2. Advantages and Disadvantages of Arrays


Discrete storage [linked list]

One of the two common applications of linear structure

Two common application Queues with linear structure

Topic: Recursion

Sum of 1.1 + 2 + 3 + 4 +... 100
2. factorial
3. Linglong
4. Walk through the maze

Module 2: Nonlinear Structure

Tree

Figure

Module 3: search and sort
Half Lookup

Sort:
Bubble
Insert
Select
Quick sorting
Recursive sorting

Knowledge about containers and data structures in Java
Iterator Interface
Map
Hash table


Outline of Data Structure Learning notes

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.