[data structure and algorithm] merge sort and cardinality sort of sorting algorithm
Merge sort and cardinality sort
Merge sort
Radix sorting
Summary of common sorting algorithms
Merge sort
Merge sort is a sort method based on the idea of merge. The classic divide and conquer strategy is adopted in this algorithm (divide the problem into some small problems and solve them rec ...
Posted by jcd on Mon, 24 Feb 2020 06:32:42 -0800
The usage and source code analysis of three java thread Synchronizers
Functions of three Synchronizers
This paper mainly introduces three thread synchronizers, their functions are as follows:
CountDownLatch: make sure that all sub threads are summarized after execution. There is a counter inside. After execution of a sub thread, count down and return;
CyclicBarrier: a ...
Posted by biocyberman on Mon, 24 Feb 2020 06:10:07 -0800
240. Search two-dimensional matrix II
An efficient algorithm is written to search a target value target in the m x n matrix. The matrix has the following characteristics:
The elements of each row are arranged in ascending order from left to right.
The elements of each column are arranged in ascending order from top to bottom.
Example:
The e ...
Posted by ferhanz on Mon, 24 Feb 2020 04:16:13 -0800
Use RSA private key to generate public key?
I really don't understand this:
Basis: http : //www.madboa.com/geek/openssl/#key-rsa , you can generate a public key from the private key.
openssl genrsa -out mykey.pem 1024
openssl rsa -in mykey.pem -pubout > mykey.pub
My initial idea was that they were generated together. Does the RSA private key contain the sum? Or public key? ...
Posted by callmecheez on Mon, 24 Feb 2020 04:01:57 -0800
Hand in hand to teach you how to transform "commodity futures Plan Commission tool" into a one-day strategy
In the last article, we learned How to write a commodity futures plan entrustment tool , this is a semi manual trading strategy. So how can we implement an automatic plan delegation strategy? In this issue, let's implement and transform this tool into an automatic trading strategy.
Strategic thinking
Similarly, the mechanism of automatical ...
Posted by skiingguru1611 on Mon, 24 Feb 2020 02:31:25 -0800
SchduleWithFixedDelay and SchduleAtFixedRate of Trample Series
Understanding timed and delayed tasks
Scheduled ExecutorService#scheduleAtFixedRate() refers to execution at a fixed frequency, and period refers to the time between two successful executions.The time at which the previous task starts, after a period, detects whether the previous task has been completed, if the previous task has been completed ...
Posted by ade234uk on Sun, 23 Feb 2020 19:51:38 -0800
An article on the beauty of DirectX 12
DirectX 12 is Microsoft's latest graphics API library, which is only supported on Win10 system (if it is not Win10, it must be upgraded to Win10). My biggest feeling about this API is that it is particularly complex, because it exposes many underlying methods. Even though I have learned DX9, I still ...
Posted by javiqq on Sun, 23 Feb 2020 03:47:31 -0800
Java multithreading - ReentrantReadWriteLock
1. Introduction to read-write lock
There is such a scenario in reality: there are read and write operations on shared resources, and write operations are not as frequent as read operations. When there is no write operation, there is no problem for multiple threads to read a resource at the same tim ...
Posted by underparnv on Sun, 23 Feb 2020 03:04:35 -0800
Learning notes of memcpy source code under glibc
I've always heard that memcpy has memory overlap. I want to see why it has this problem?
glib version 2.15
#include <string.h>
#include <memcopy.h>
#include <pagecopy.h>
#undef memcpy
void *
memcpy (dstpp, srcpp, len)
void *dstpp;
const void *srcpp;
size_t len;
{
u ...
Posted by AE117 on Sat, 22 Feb 2020 22:27:57 -0800
Pool technology -- custom thread pool
Catalog
Pool technology -- custom thread pool
1. Why use thread pools?
1.1 characteristics of pool technology:
1.2 benefits of thread pool:
1.3 how to customize a thread pool
2. Three methods
2.1. Thread pool method of single thread
2.2. Fixed thread pool size method
2.3 me ...
Posted by Justin98TransAm on Sat, 22 Feb 2020 19:42:40 -0800