Chapter 1 Overview of Data Structures and Algorithms
The relationship between data structure and algorithm
- Data structure (data structure) is a discipline that studies the way of organizing data. With a programming language, there is also a data structure. Learning data structure well can write more beautiful and efficient code.
- To learn the data structure well, you must think more about how to solve the problems encountered in life and use programs to solve them.
- Program = data structure + algorithm
- The data structure is the foundation of the algorithm . In other words, if you want to learn the algorithm well, you need to learn the data structure in place.
Application of data structure and algorithm
- Road construction problem => minimum spanning tree (weighted value) [data structure] + Primm algorithm
- Shortest path problem => graph + Freud algorithm
- Tower of Hanoi => branch algorithm
- Eight Queens Problem => Backtracking Method
Summary:
Simple data structure can be completed,
difficult data structure and algorithm are needed
Linear structure and nonlinear structure
The data structure includes: linear structure and non-linear structure.
Linear structure
- As the most commonly used data structure, linear structure is characterized by a one-to-one linear relationship between data elements
- Linear structure has two different storage structures, namely sequential storage structure ( array ) and chain storage structure ( linked list ).
A linear table stored sequentially is called a sequential table, and the storage elements in a sequential table are continuous.
A linear table stored in a chain is called a linked list. The storage elements in a linked list are not necessarily continuous. The element nodes store data elements and adjacent elements. Address information - Common linear structures are: arrays, queues, linked lists and stacks, we will explain them in detail later.
Non-linear structure
Non-linear structures include: two-dimensional arrays, multi-dimensional arrays, generalized tables, tree structures, graph structures
Chapter 2 Sparse Arrays and Queues
Chapter 2 Sparse Arrays and Queues
Chapter 3 Linked Lists
The first part of the linked list: adding, deleting, modifying, reversing, merging, etc.
Chapter 4 Stack
The second part of the stack (prefix, infix, postfix expression (reverse Polish expression))
Chapter 5 Recursion
Recursion (introduction to recursion, maze problem, eight queens problem)
Chapter 6 Sorting Algorithm
Algorithm complexity (time frequency, time complexity introduction calculation, space complexity)
Sorting algorithm basis (bubble sort, selection sort, insertion sort)
Sorting algorithm high-level (Hill sort, quick sort, merge sort)
Java sorting algorithm-radix sort
Chapter 7 Search Algorithm
Chapter 8 Hash Table
Hash table (hash table)-add, delete, modify and check
Chapter 9 The Basics of the Tree Structure
Binary tree-add, delete, modify and check
Binary tree (sequential storage binary tree, threaded binary tree)
Chapter 10 Practical Application of Tree Structure
Practical application of tree structure (heap sort, Huffman tree, Huffman tree)
Practical application of tree structure (Huffman tree coding)
Practical application of tree structure (binary sort tree, BST, binary search tree)
Practical application of tree structure (balanced binary tree, AVL tree)
Chapter 11. Multiple Search Trees
Multi-way search tree (learn about it)
Chapter 12 Figures
Graph (, graph creation, depth-first traversal, breadth-first traversal)
Chapter 13 Algorithms Commonly Used by Programmers
Commonly used algorithm-divide and conquer algorithm (Tower of Hanoi)
Commonly used algorithm-dynamic programming algorithm (knapsack problem)
Common algorithms-KMP algorithm (string matching problem, brute force matching algorithm)
Commonly used algorithm-greedy algorithm (set covering problem)
Commonly used algorithms-prim algorithm (road construction problem, minimum spanning tree problem)
Commonly used algorithms-Kruskal algorithm (bus stop problem, minimum spanning tree problem)
Commonly used algorithm-Dijkstra algorithm (shortest path problem)
Commonly used algorithm-Floyd (Floyd) algorithm (shortest path problem)
Commonly used algorithm-horse riding chess board algorithm (knight traveling problem)
to sum up
How to learn Java well? (After reading it, I benefited a lot)