[data structure] Trie tree (dictionary tree)

1 Basic Concepts Trie tree (dictionary tree), also known as word lookup tree, is a data structure that can efficiently store and find string sets (not limited to strings). In y's eyes, it is a very simple data structure. It includes the following three properties: The root node does not contain characters. Except for the root node, each node ...

Added by robembra on Tue, 21 Dec 2021 13:43:52 +0200

C + + implementation factory mode

1, Simple factory mode 1.1 simple factory mode Simple Factory Pattern specifically defines a class to be responsible for creating instances of other classes. The created instances usually have a common parent class. Simple factory mode is a way to instantiate objects. As long as you enter the name of the object to be instantiated, you can cr ...

Added by david212 on Tue, 21 Dec 2021 12:16:01 +0200

Troubleshooting of CPU and IO idle but high load problems

background For an online server, the monitoring alarm shows that the server load is high, reaching more than 100. Log in to the machine and use the top command to view. The CPU and IO utilization are low. At the same time, it is found that there are many ps and pidof processes in the system, and their process status is D. using the kill co ...

Added by SsirhC on Tue, 21 Dec 2021 12:11:56 +0200

LeetCode brush notes binary search local order

Local ordering of binary search We already know that binary search is a search algorithm for finding a specific element in an ordered array. What if an array is not globally ordered, but locally ordered? At this time, we can use the divide and conquer strategy. We can perform binary search in the locally ordered interval, and then combine eac ...

Added by Rayman3.tk on Tue, 21 Dec 2021 07:36:47 +0200

C/C + + Programming: zlib manual translation

edition #define ZLIB_VERSION "1.2.11" #define ZLIB_VERNUM 0x12b0 test #include <stdio.h> #include <zlib.h> int main(void) { printf("ZLIB_VERSION = %s\n", ZLIB_VERSION); printf("ZLIB_VERNUM = %d", ZLIB_VERNUM); return 0; } introduce zlib compression library provides compression and decompression algorithms ...

Added by benjrox on Tue, 21 Dec 2021 02:55:09 +0200

C + + Standard Template Library

Container class vector Take vector as an example vector <int> a = {1,2,3,4,5};//Put the array {1,2,3,4,5} into the container class instance vector <int> a = vector <int>(5); //Create a container class instance with 5 elements vector <vector<int>> a = vector <vector<int>>(5);//Create a container c ...

Added by blufish on Mon, 20 Dec 2021 23:34:40 +0200

Algorithm learning Leetcode -- sum of three numbers

preface Give you an array num containing n integers. Judge whether there are three elements a, b and c in num, so that a + b + c = 0? Please find all triples with sum 0 and no repetition. Note: the answer cannot contain repeated ternary 1, Violent solution Seeing that the problem is summed according to conditions, the first thing ...

Added by Buchead on Mon, 20 Dec 2021 15:12:14 +0200

Atcoder beginer contest 215 problem solution (A-F)

AtCoder Beginner Contest 215 Problem solving (A-F) A. Your First Judge Main idea of the title: Determine whether the string is equal to " H e l l o , ...

Added by sycoj0ker on Mon, 20 Dec 2021 07:11:42 +0200

Project - order system

Project description function Users can access the server through the browser to obtain dish information and order meals;The administrator can access the server through the browser to realize the management of orders and dishes; Technical point Multithreading, socket, http, json, mysql, stl; frame Framework: simple MVC framework;M (Mod ...

Added by prabhuksmani on Mon, 20 Dec 2021 00:53:01 +0200

[C + + from bronze to king] Part 20: a preliminary understanding of set, map, multiset and multimap of STL

Catalogue of series articles preface 1, Associative container In the initial stage, we have touched some containers in STL, such as vector, list, deque and forward_list(C++11), etc. these containers are collectively referred to as sequential containers, because their bottom layer is a linear sequence data structure, in which th ...

Added by Rigo on Sun, 19 Dec 2021 20:57:39 +0200