[Data Structure 05] Red-Black Tree Base - Binary Search Tree

Catalog 1. Introduction to Dichotomy 2. Binary Search Tree Definition 3. CRUD of Binary Search Tree 4. Two extreme cases of binary search trees 5. Summary of Binary Search Tree Preface stay [Algorithm 04] Tree and Binary Tree In this article, we will expand our explanation on the bas ...

Added by dta on Mon, 16 Dec 2019 03:03:03 +0200

Path java with a value in binary tree

Path java with a value in binary tree Title Description Input the following node and an integer of a binary tree, and print out all paths in which the sum of node values in the binary tree is the input integer. Path is defined as a path from the root node of the tree to the node that the leaf node passes through. (Note: in the ...

Added by perficut on Sat, 14 Dec 2019 17:19:06 +0200

w command of Linux command explanation

w command of Linux command explanation 1. Order details ··· NAME w - Show who is logged on and what they are doing. The w command is used to show who is logging in and what they are doing. DESCRIPTION w displays information about the users currently on the machine, and their processes. The header shows, ...

Added by Dorin85 on Fri, 13 Dec 2019 17:50:03 +0200

Thread pool tool class encapsulation

Why to use thread pool 1. Frequent creation and destruction of threads consumes resources and time. In other words, thread pools can save resources and time. 2. Some threads take less time to execute tasks than to create and destroy threads.2. Function of thread pool: Thread pool is a technology of creating threads in advance. B ...

Added by jkohns on Thu, 12 Dec 2019 21:17:57 +0200

PHP DES-ECB encryption docking Java decryption

Recently, the company has a business that needs to connect to the third-party interface, but the parameters need to be encrypted. The other side only provides a java demo and searches all over the Internet. No direct method can be found. Later, it was connected with the company's Android Engineer. Here's a record of the general process. First, ...

Added by tcorbeil on Wed, 11 Dec 2019 23:00:29 +0200

Styles to be noticed in embedding html in mail

In the work, there is often a need to send mail to users, and front-end engineers are needed to make html format mail. However, due to the limited support of mail clients for styles, many principles need to be paid attention to to to in order to be compatible with many kinds of browsers: 1. Use table+css layout for mail 2. The main part of the ...

Added by rob_maguire on Wed, 11 Dec 2019 11:35:29 +0200

[From Getting Started to Abandoning-ZooKeeper] ZooKeeper Actual-Distributed Lock-Upgrade

Preface Above [From Getting Started to Abandoning-ZooKeeper] ZooKeeper Actual-Distributed Lock In ZooKeeper, we implement a distributed lock by utilizing the temporary node feature of ZooKeeper.However, it is a polling method to determine whether a continuous attempt to acquire a lock is necessary for the CPU to idle, and the herding effect is ...

Added by thinsoldier on Wed, 11 Dec 2019 08:43:43 +0200

Basic usage of Numpy

1. Create an array with Numpy numpy.array(object): to create an array, unlike array.array(typecode [, initializer]), array.array() can only create one-dimensional arrays Numpy.range (start, stop, step, dtype = none): create a one-dimensional array (step is the best integer) starting from start and ending at stop (excluding stop), with step as t ...

Added by shyonne2004 on Tue, 10 Dec 2019 23:23:20 +0200

Adjust the array so that all odd numbers are in front of even numbers 2. Young's matrix

1. Adjust the array so that all odd numbers are ahead of even numbers. Title: Input an integer array and implement a function to adjust the order of the numbers in the array so that all the odd numbers in the array are in the first half of the array and all the even numbers are in the second half of the array. #include <stdio ...

Added by jds580s on Tue, 10 Dec 2019 18:45:57 +0200

[NOIP series] discretization

NOIP series What is discretization in c + +? Take a look at the example first Given the number of n (possibly the same), how many times does the most frequent number occur. (n<= 10 ^ 9) Um... This problem looks like a water problem. Just open a V array to record the number of times each number appears, such as v[a[i]] + + ...

Added by kokomo310 on Tue, 10 Dec 2019 17:39:52 +0200