Application of Single Chain List - Address Book Design (Data Structure Course Setup)
1. Experimental Purpose
1) Familiarize yourself with and master the logical and physical structure of linear tables;
2) Familiarize yourself with and master the storage structure, basic operations and definitions of specific functions of linear chained lists;
II. EXPERIMENTAL CONTENTS
Design a main menu program with multiple menu items, and ...
Added by lightpace on Mon, 17 Jan 2022 09:30:59 +0200
Stack implementation arithmetic expression evaluation
Arithmetic expression evaluation A typical problem solved by stack is the evaluation of arithmetic expressions, such as "3 + 4 * 2 - (1 + 1) #". In the process of expression calculation, it is not calculated immediately after reading an operation, but compared with the following operators to determine which one to calculate first. In ...
Added by uncleronin on Mon, 17 Jan 2022 08:35:40 +0200
[Python] detailed explanation, addition, deletion and modification of dict dictionary
summary
Python Dictionary (dict) is an unordered and variable sequence. Its elements are stored in the form of "key value". In contrast, list s and tuple s are ordered sequences, and their elements are stored next to each other at the bottom.
The dictionary type is the only mapping type in Python.
"Mapping" is a term ...
Added by paulnaj on Mon, 17 Jan 2022 08:25:12 +0200
Linked list, single linked list, two-way (one-way) circular linked list
dynamic chain
Single linked list: //Head node refers to the first node in the linked list, which can be divided into real head node and virtual head node; (1) Real head node: the first node is used to store data (usually the real head node is used). (2) Virtual head node: the first node cannot store data. (3) Header pointer: it is just a ref ...
Added by ataylor20 on Mon, 17 Jan 2022 07:54:50 +0200
Data structure and algorithm -- linear table
1, Introduction to linear table
Linear table is
A finite sequence consisting of zero or more data elements. The characteristic of a linear table is that in a sequence, except for the head and tail elements, each element has
With and only one direct precursor,
With and only one direct successor,
The sequence header element has no direct ...
Added by ppgpilot on Mon, 17 Jan 2022 07:13:04 +0200
c++ sort() function and its application
sort() function: it is a sort function in c++ stl library. Learning to use this function can greatly save us from writing a sort function, such as bubble sort (O(n2)). Moreover, this sort function is written by quick sort, so the time complexity is O(nlogn), so it can also greatly reduce the program running time.
Note that the sorting range is ...
Added by diondev on Mon, 17 Jan 2022 06:52:35 +0200
Data structure - linear table notes
Linear table
Definition and characteristics of linear table
A linear table is a finite sequence of data elements with the same characteristics.
Linear list: an ordered sequence composed of n (n > = 0) data elements (nodes) a1,a1,... An.
definition:
1. The number n of data elements is defined as the length of the table.
2. When n=0, it ...
Added by zrueda on Mon, 17 Jan 2022 06:36:54 +0200
C/C + + language data structure quick start (code parsing + content parsing) queue
1, Basic concepts of queue
Note: three elements of data structure - logical structure, data operation and storage structure (physical structure) Different storage structures lead to different implementations of operations
1. Definition of queue
A linear table is a finite sequence of n (n > = 0) data elements with the same data type, whe ...
Added by stiphu on Mon, 17 Jan 2022 02:13:54 +0200
Java double pointer technique
When we practice Java algorithm, we will inevitably encounter some problems. Using some skilled problem-solving methods is much better than not using them. This time, we mainly share the skills about double needles.
Double pointers are generally divided into two categories: one is fast and slow pointers, and the other is left and right pointer ...
Added by Sweets287 on Sun, 16 Jan 2022 21:03:47 +0200
Binary tree creation, traversal, sorting
Binary tree
1. What is a binary tree
Binary tree is a kind of tree. Each node can have at most two subtrees, that is, the maximum degree of the node is 2 (node degree: node degree)
Some subtrees).
2. Binary tree species
Binary search tree:
The left side of the current root node is smaller than the root node, and the right side of the ...
Added by KendersPlace on Sun, 16 Jan 2022 20:34:25 +0200