vector Foreword In the past few days, I have used STL a lot when writing code, and I have also felt the power of STL, so I reviewed the content of STL again, and summarized and extracted some basic things and important content. This is a vector article . C++’s STL provides us with many […]
Tag: insertion
Insertion and deletion operations of B+Tree in mysql
The query operation of B + Tree is being discussed on the Internet, but I have a question about how the insertion and deletion operations of B + Tree are performed. Before discussing this issue, let us first talk about a concept, primary key auto-increment, why it is best to set the primary key auto-increment. […]
[Data structure] Addition, deletion, checking and modification of one-way linked list and insertion and deletion of specified pos position
Table of Contents The concept and structure of one-way linked list tail plug Head plug tail delete ?edit Header deletion Find Insert forward at pos position Insert after pos position delete pos position Delete the last position of pos Summarize code The concept and structure of one-way linked list Concept: A linked list is a […]
Data structure sorting algorithm (simple selection, fast, half insertion sorting)
Table of Contents 1. Simple selection sorting 2. Quick sort 3. Half-way insertion sort 4. Data analysis 5. Source code analysis 1. Simple selection sort //Simple selection sorting void selection_sort(zstu &S,int sum){ bool desc; cout<<“Please enter the sorting method (1 means from high to low and vice versa 0….):”<<endl; cin>>desc; for(int i=0;i<sum-1;i + + ){ […]
Discussion on MySQL bulk data insertion scheme
Because the company has a need to insert a large amount of data, it took time to research it, and currently summarizes 5 methods: Single data loop insertion Perform sql splicing and insertion Batch insertion using mybatis plus (mp) Combined with sql splicing + loop insertion An upgraded version of 4, inserted into the same […]
1.C language-sequence table-head insertion, head deletion, tail insertion, tail deletion, search, insertion and deletion
Article directory Introduction Dynamic sequence list structure 1.Head plug function 2.Header deletion function 3.Tail plug function 4. Tail deletion function 5. Search function 6.Insert function 7. Delete function 8. This program contains a total of 4 files, 2 .c files and 2 .h files 8.1 SeqList.h file 8.2 SeqList.c file 8.3 test.h file 8.4 test.c […]
[Data structure] Linear list (4) Various operations of doubly linked list (insertion, deletion, search, modification, traversal and printing)
Table of Contents The definition of linear tables and their basic operations (sequential table insertion, deletion, search, modification) 4. Linked storage structure of linear table 1. Single linked list 2. Circular linked list 3. Doubly linked list a. Doubly linked list node structure b. Create a new node c. Insert node at the end of […]
Six major algorithms: insertion, Hill, selection, heap sort, quick sort, counting sort
1. Insertion sort What is insertion sort, and what is the principle of insertion sort? Insertion sort is just like drawing a card and inserting it into the appropriate position. Principle of code implementation: for (int i = 1; i < n; i + + ) { int end = i – 1; int tmp […]
20-Data structure-Internal sort-Insertion sort
Introduction: Insertion sorting basically has two steps. First, obtain the insertion position through comparison, then move to vacate the position that needs to be inserted, and finally insert the value. Table of Contents 1. Direct insertion sort 1.1 Introduction: 1.2 Code 2. Half-way insertion sort 2.1 Introduction: 2.2 Code: 3. Hill sorting 3.1 Introduction: 3.2. […]