STL–vector container (construction, traversal, insertion and deletion, capacity size, data access, dynamic expansion, etc.)

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 […]

[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 […]

[C++ rewriting the bottom layer of Skynet 03] skynet actual combat—insertion and pop-up of global message queue, imitating skynet sending messages, message transmission and message processing between services

Directory of series articles [C++ Rewriting Skynet Bottom Layer 01] Skynet Practical Combat-sunnet basic framework, create, open, wait for thread exit methods, imitate skynet to write message classes [C++ Rewrite Skynet Bottom Layer 02] Skynet Practical Combat-Imitating Skynet to write service classes, object management under multi-threading, spin lock mutex program writing, hash table management objects, […]

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 […]

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. […]