Recently, Ben Ming reviewed Graph Theory and found that he had forgotten it, so he planned to write such a learning note to review it.
1. Representation of Graphs
1. Adjacency Matrix
Edges are stored in a two-dimensional array with \(map[i][j]=k\) representing the point\(i\) to point\(j\) weighting \(k\).Edge-adding and edge-checking complexity ...
Posted on Thu, 01 Aug 2019 11:50:33 -0700 by DanArosa
Recently I saw Mr. Ruan Yifeng's Principle of similar picture search (2) In this paper, the content feature method is used to compare the similarity of two pictures.
Zoom pictures to 50x50 size
Convert to Grayscale Picture
Determining threshold using Otsu's method
Binarize pictures through thresholds
Comparing the pixels corres ...
Posted on Thu, 01 Aug 2019 11:01:46 -0700 by lamia
Given an ordered array arranged in ascending order, find two numbers so that the sum of them equals the target number.
The function should return the two subscript values index1 and index2, where index1 must be less than index2.
The returned subscripts (index1 and index2) are not ze ...
Posted on Wed, 31 Jul 2019 23:42:42 -0700 by deft
Translation into Chinese is a session - > the server is used to identify the unique identity of the user, and the underlying is actually implemented with cookie s.
Each browser accessing the server creates a unique session Id that does not duplicate.
2. Get session Id
Different bro ...
Posted on Wed, 31 Jul 2019 22:40:19 -0700 by frijole
Last article We looked at the implementation of the mutex lock. But if business logic reads more and writes less, if mutexes are used every time it reads and writes, the overall efficiency will become very low. In fact, mutexes are not needed to lock data if it is read only. Mutual exclusion is required only for write operations, but wr ...
Posted on Wed, 31 Jul 2019 21:25:12 -0700 by konn
Links to the original text: https://blog.csdn.net/qq_37941471/article/details/82107077
Reproduced in: https://blog.csdn.net/qq_37941471/article/details/82107077
1. The form of the constructor of st ...
Posted on Wed, 31 Jul 2019 20:54:41 -0700 by hyabusa
1. Link List
Link list is a kind of discontinuous and non-sequential storage structure on physical storage unit. The logical order of data elements is realized by the order of pointer links in the linked list. A list consists of a series of nodes (each element in the list is called a node), which can be dynamically generated at run time. Each n ...
Posted on Wed, 31 Jul 2019 09:50:38 -0700 by AngelicS
PS:2018/03/27 Optimize the format of the article, add some new test codeWhen it comes to regularization, we are often exposed to the fact that the front-end is small enough to verify and plug-ins can be seen everywhere. Simple methods can also meet the requirements, but lack of flexibility. Once the need for complexity, there is no more ...
Posted on Wed, 31 Jul 2019 04:37:14 -0700 by fitzsic
Mutex is a simple and easy-to-use mutex provided by go language. Mutex is the main means of access control for shared resources in concurrent programs. The structure of Mutex is very simple. There are only two ways to expose it. One is to lock and the other is to unlock it. So how do we implement Mutex mutex exclusion locks that we use ...
Posted on Wed, 31 Jul 2019 02:35:55 -0700 by ataria
Depth-first traversal and breadth-first traversal
What is depth first and breadth first?
In fact, simply speaking, depth first is top-down traversal search breadth first is layer-by-layer traversal, as shown in the following figure
1. Depth first2. breadth first
The difference between the two
For an algorithm, it is nothing more than time for s ...
Posted on Tue, 30 Jul 2019 17:47:29 -0700 by localhost