Data structure: Principle and implementation of red-black tree

Article directory Red black tree concept red black tree properties Simulation implementation of red-black tree Red-black tree balance problem Overall implementation and testing This article is used to disassemble and simulate the red-black tree, laying the foundation for subsequent map and set encapsulation. The concept of red-black trees The red-black tree is also a binary […]

“Data Structure, Algorithm and Application C++ Language Description” – Code to implement key-value ordered linked list jump list

Skip list Definition Searching in a dictionary of n number pairs described by an ordered linked list requires at most n key comparisons. If a pointer is added to the middle node of the linked list, the number of comparisons can be reduced to n/2 + 1. At this time, in order to find a […]

Storage structure and query performance optimization of ClickHouse primary key index

Table of Contents Storage structure and query performance optimization of ClickHouse primary key index 1. Storage structure of primary key index 2. Query performance optimization methods 2.1. Use primary key index table 2.2. Column storage and data compression 2.3. Merge engine (MergeTree) 2.4. Data copy in conclusion Sample code: Use ClickHouse for e-commerce sales data […]

[Data structure] Sequence table | Detailed explanation

There are two basic storage structures used to store linear tables in computers: sequential storage structures and chained storage structures. This article introduces the use of sequential storage structure to realize linear table storage. Sequential storage definition The sequential storage structure of a linear list refers to a storage unit with consecutive addresses that stores […]

Classic OJ questions about linked lists (palindromic structure of linked lists, linked lists with rings, deep copies of linked lists)

Table of Contents Preface 1. Reverse a singly linked list. 2. Given a non-empty singly linked list with head node head, return the middle node of the linked list. 3. The palindrome structure of the linked list. 4. The problem of chain strap ring (*****) 4.1 Whether to wear a ring 4.2 Nodes entering the […]

[Data Structure] Single Linked List OJ Questions (2)

Blog homepage: The little sheep has insomnia. Series of columns: “C Language” strong> 《Data Structure》 《Linux》《Cpolar》 Thank you everyone for likingfavorites?comments Article directory 1. Split linked list 2. Palindrome linked list 3. Intersection linked list 4. Circular linked list I 5. Circular Linked List II 6. Deep copy of linked list 1. Split linked list […]

[C language data structure——Binary tree]

Article directory Article directory 1. What is a tree? tree definition tree type tree depth Basic terminology for trees 2. Full binary tree definition Characteristics of a full binary tree 3. Complete binary tree definition Features 4. Properties of binary trees 5. Storage structure of binary tree sequential storage structure chain storage structure 6. Basic […]

Data structureLambda

?Author: Xiao Hu_Bu Muzhu Author’s homepage: Xiao Hu_Bumuzzled’s personal homepage Included column: A brief discussion of data structure Continue to update articles and follow bloggers to avoid detours. Thank you for your support Lambda expression 1. Background 1.1 Grammar 1.2 Functional interface 2. Basic use 3. Variable capture 3.1 Anonymous inner classes 3.2 Variable capture […]