The hand of data structure is red black tree

catalogue 1. Introduction of red black tree  2. Basic properties of red black tree and definition of node 3. Rotation of red and black trees 4. Insertion of red black tree Insertion case I Insertion case II Insertion case III Insertion case IV Red black tree insertion summary: 5. Deletion of red black tree 6. Red black tree su ...

Added by B-truE on Mon, 14 Feb 2022 08:59:06 +0200

Shortest path algorithm template (Dijkstra, Bellman_ford, spfa, Floyd)

Summary of shortest path algorithm templates In graph theory, the graph is directed and undirected, and only the algorithm of the directed graph is considered here. For undirected graphs, we see them as a special kind of directed graph, for all undirected edges u ↔ ...

Added by cougar23 on Sun, 13 Feb 2022 20:04:49 +0200

JDK source code series - HashMap implementation principle

1, Introduction HashMap is implemented by hash table, with key/value storage structure. Each key corresponds to a unique value. The speed of query and modification is very fast, and can reach the average time complexity of O(1). It is non thread safe and does not guarantee the storage order of elements; 2, Inheritance class diagram hashMap im ...

Added by Buttero on Sun, 13 Feb 2022 15:47:19 +0200

Data structure and algorithm

Data structure and algorithm 2020 notes 1, Linear structure and nonlinear structure 1.1 linear structure (9.17) Common linear structures: array, queue, linked list, stack Sequential storage structure (array) and chain storage structure, one-to-one linear relationship One-to-one array structure, non-linear array structure, non-linear tree s ...

Added by postalservice14 on Sun, 13 Feb 2022 11:00:19 +0200

PTA week 3 * (1039-1041)

I've had a good time these days. I had a good time with my family and felt super bored when I was ready to go back to school. After all the updated dramas were finished, I picked a few topics that could not form a group to pass the time. I'm going to set foot on the bullet train back to school in Nanjing in the afternoon. catalogue 1039 Cou ...

Added by promovi on Sun, 13 Feb 2022 07:04:07 +0200

Really explain the five Redis data structures

Preface As a cached database, Redis currently has a large usage in the market. Most people use its string format storage in their work. For the rest of the data structure, it is rarely used. The basic data structure of Redis includes: string, hash, list, set, sorted set. These five data structures are often used in different scenarios in ...

Added by MatrixGL on Sat, 12 Feb 2022 20:35:22 +0200

java. Quick sort QuickSort

Record the differences and improvements of one-way quick sort, two-way quick sort and three-way quick sort Basic idea: divide the records to be arranged into two independent parts through one-time sorting. If the keywords of one part of the records are smaller than those of the other part and larger than those of the other part, the records of ...

Added by canishk on Sat, 12 Feb 2022 18:19:30 +0200

java outputs various triangles (*)

package triangle; public class triangle { public static void main(String[] args) { for (int j = 1; j <= 9; j++) { for (int i = 1; i <= 5; i++) { System.out.print("* ");} System.out.println(); } } } Recently, I'm trying to do some basic problems when I firs ...

Added by nakkaya on Sat, 12 Feb 2022 17:40:25 +0200

Complexity [data structure and algorithm]

What is a data structure Data structure is the way that computers store and organize data, and there are one or more specific relationships between them What is an algorithm Algorithm: a well-defined calculation process that takes an input and produces an output The algorithm is a series of calculation steps to convert the input ...

Added by Crow on Sat, 12 Feb 2022 15:59:37 +0200

Discrete Mathematics Experiment 1

Experiment Title: simple diagramming, judgment of connected graph, Euler graph and Hamiltonian graph Purpose of the experiment: Master the definition and judgment method that can be simplified;Master the judgment methods of connected graph and Euler graph;Master the search method of Euler loop;Understand the practical application of Euler cha ...

Added by ungovernable on Sat, 12 Feb 2022 12:34:59 +0200