2 / 8 linear table of data structure and algorithm
catalogue
2.1 definition and characteristics of linear table
2.2 case introduction
2.3 type definition of linear table
2.4 sequential representation and implementation of linear table
2.4 supplement: parameter transfer in C + +
Implementation of basic operation of sequence table
Write after:
2.1 definition and characteristics of linear ...
Added by shumway on Sun, 02 Jan 2022 12:16:27 +0200
[HNOI2016] sequence (line segment tree)
Extended version of the title: there are two lengths
n
n
Sequence of n
a
,
b
a,b
a. B. you need maintenance
...
Added by tetecko81sk on Sun, 02 Jan 2022 07:28:48 +0200
Java sequential table implementation
Sequential table is a linear structure in which data elements are stored in sequence with a storage unit with continuous physical addresses. Generally, array storage is used. Complete the addition, deletion, query and modification of data on the array. Sequence table can be generally divided into: static sequence table: using fixed length array ...
Added by ec on Sun, 02 Jan 2022 00:04:11 +0200
Data structure and algorithm (2-2) linked storage of linear list (single linked list, static linked list, circular linked list, two-way circular linked list)
catalogue
1, Single linked list
1. Storage mode
2. Insert
3. Delete
Total code:
II. Static linked list
1. Storage mode
2. Insert
3. Delete
4. Traversal
Total code:
3, Circular linked list
Total code:
4, Bidirectional circular linked list
1. Storage method:
2. Insert and delete
3. Forward traversal and reverse traversal
Total ...
Added by benrussell on Sat, 01 Jan 2022 21:41:04 +0200
[data structure]: stack and queue
Stack
Basic concept of stack
Basic properties of stack
A Stack is a linear table that allows only one segment to be inserted or deleted.Top of stack. The end of a linear table that allows insertion and deletion.The Bottom of the stack is fixed and cannot be inserted or deleted.Empty stack. Does not contain any elements.
Basic operation ...
Added by aprinc on Sat, 01 Jan 2022 20:00:00 +0200
Decoration pattern & prototype pattern of design pattern
1, Decoration mode:
1. Basic theory: Decoration pattern: dynamically add some additional responsibilities to an object. In terms of adding functions, decoration pattern is more flexible than generating subclasses
Decoration mode summary: A way to dynamically add more functions to existing functions. When the system needs new functionality, ...
Added by tyler on Sat, 01 Jan 2022 15:34:51 +0200
[sword finger offer] rebuild binary tree
First level binary tree traversal
Topic introduction
Given a (pre order traversal) string, construct a binary tree and print it in medium order, # = = nullpet, '' = = empty tree
If you forget, please read this blog ----- > Review the concept of binary tree
thinking
Preorder is first root traversal, in the left subtree ...
Added by usmc on Sat, 01 Jan 2022 13:02:12 +0200
Data structure and algorithm - queue
Part I: Data structure and algorithm sparse sparsearray array
The main contents mentioned above:
Save sparse arrays to disk, such as map dataWhen restoring the original array, read the map Data for recovery
Data structure and algorithm - queue
1. Application scenario and introduction of queue
scene
Case of Bank Queuing
Queue introduct ...
Added by prexep on Sat, 01 Jan 2022 11:53:12 +0200
105 construct binary tree from preorder and inorder traversal sequences & & 106 construct binary tree from inorder and postorder traversal sequences (recursion + hash)
introduction
These two questions are mainly to investigate the mastery of binary tree traversal, that is, the original binary tree is derived from the front order and middle order, and the original binary tree is derived from the back order and middle order. Let's talk about the derivation process first; Preorder and middle order Know the preo ...
Added by iarp on Sat, 01 Jan 2022 04:29:54 +0200
Computer experiment of data structure (Chapter II) IV
Computer experiment of data structure (Chapter II) III
12. In an incrementally ordered linear table, there are elements with the same value. If the storage method is a single linked list, remove the elements with the same value so that there are no duplicate elements in the table.
void DeleteEle(LinkList &L)
{
LNode* p = L->next, *q;
...
Added by Beatnik on Sat, 01 Jan 2022 00:54:08 +0200