Discrete Mathematics II-Solution of Spanning Tree, Loop Space and Break Set Space
Experimental purposes:
Master the solution of undirected connected graph spanning tree;Master the solution of basic loop system and loop space.Master the basic cut set system and the solution of the cut set space;Understand the practical applications of spanning tree, loop space, and breakset space.
Experimentation Requirements
1. Given an ...
Posted by rocksolidsr on Wed, 22 Dec 2021 21:53:56 +0100
Source code analysis of add() method in TreeSet -- de duplication and automatic sorting
1. Overview of TreeSet class functions
First, the TreeSet class uses the natural order of elements to sort, or according to the Comparator provided when creating the set, depending on the construction method used.
We know that the underlying data structure of TreeSet is a red black tree. Let's see how TreeSet ensures the automatic sorting and ...
Posted by phat_hip_prog on Wed, 22 Dec 2021 20:45:43 +0100
1010 detailed explanation of radiation test points, pits and problems needing attention with two solutions of sequential search and binary search (PAT (Advanced Level) Practice)
catalogue
subject
Test sample
Input sample 1 (the title comes with it)
Output sample 1
Input example 2 (the title comes with)
Output sample 2
Input example 3 (self compiled, special case - N1 and N2 are 0)
Output sample 3
Input example 4 (self compiled, normal)
Output sample 4
Input example 5 (self compiled, normal)
Output example 5 ...
Posted by RaythMistwalker on Wed, 22 Dec 2021 17:28:26 +0100
Interpretation of source code design of ziplist, quicklist and listpack
Inspiration from ziplost to quicklist and then listpack
When introducing Redis's optimized design of data structure to improve memory utilization, it mentioned that compressed list (ziplost) can be used to save data. So now you should also know that the biggest feature of ziplost is that it is designed as a memory compact data structure, occup ...
Posted by kubak on Wed, 22 Dec 2021 13:50:48 +0100
Data structure sparse matrix X
Data structure - sorting notes of arrays and generalized tables (Chapter 6). If there are errors, please correct them. Compressed storage of special matrix Common body type
When the number s of non-zero elements in a matrix with large order is very small relative to the total number t of matrix elements, that is, S
...
Posted by amalosoul on Wed, 22 Dec 2021 11:02:27 +0100
Puge algorithm dichotomy
Dichotomy?
Let's look at a very interesting passage first
One day Xiao Ming went to the library to borrow N books. When he got out of the library, the alarm sounded, so the security guard stopped Xiao Ming to check which book was not registered for lending. Xiao Ming is going to pass each book under the alarm to find out the book tha ...
Posted by kindoman on Wed, 22 Dec 2021 06:25:42 +0100
Coding and compiling of messages
Content:
Receive a string of message characters from the keyboard and output the corresponding Huffman code. At the same time, it can translate the code string generated by Huffman code and output the corresponding message string.
Design requirements:
(1). Construct a Huffman tree;
(2). Implement Huffman coding and d ...
Posted by slobodnium on Wed, 22 Dec 2021 03:16:35 +0100
[graph theory] find a girlfriend with Hungarian algorithm (great victory of pure love party)
1, Some concepts
1. Bipartite diagram
It must not contain odd rings, but may contain rings with even length, not necessarily connected graphsBipartite graph is a special model in graph theory. Let G=(V,E) be an undirected graph. If vertex v can be divided into two disjoint subsets (A,B), and the two vertices i and j associated with each e ...
Posted by raj86 on Wed, 22 Dec 2021 00:25:55 +0100
Sorting (implemented in C language)
catalogue
1. Sorting and classification
2. Insert sort
2.1 direct insertion sort
2.2. Shell Sort
3. Select Sorting
3.1 selection and sorting
3.2. Heap sort
4. Exchange sorting
4.1 bubble sorting
4.2 quick sort
4.3 quick sort non recursive
5. Merge sort
5.1 merge sort
5.2 merge sort non recursive
6. Non comparative sorting
6.1 ...
Posted by revdev on Tue, 21 Dec 2021 23:36:45 +0100
All ❤️ Two layer cycle ❤️ How to distinguish between bubble sorting, selection sorting and insertion sorting
These three sorts have two-layer cycles, which is their superficial feature. I call the external cycle large cycle and the internal cycle small cycle. Their basic idea of algorithm is the same, that is, the sequence to be sorted is divided into disordered interval and ordered interval. Each large cycle can increase the ordered interval and r ...
Posted by Felex on Tue, 21 Dec 2021 16:54:23 +0100