Data structure -- complete version of binary search tree (C + +)

When we search for an integer among n dynamic integers, there are several methods ① Using dynamic arrays, the average time complexity is O(n) ② Using an ordered dynamic array and binary search method, although its worst time complexity is only O(logn), its average time complexity of addition and depth is too high, which is O(n). ③ Using a link ...

Posted by nonexist on Wed, 25 May 2022 04:01:05 +0300

Opencv c + + (image processing)

catalogue 1, Image reading and display 2, Image preprocessing Principle and algorithm of Gaussian blur Canny edge detection 3, Image clipping 4, Draw shapes and add text 5, Perspective transformation 6, Color detection 7, Shape detection and contour detection 8, Face recognition 1, Image reading and display #include<opencv2/imgc ...

Posted by iloveyou on Wed, 25 May 2022 00:49:28 +0300

P1023 (tax and subsidy issues)

Topic background The lower the price of each commodity, the higher the sales volume. Now we know the cost of a commodity and its sales volume at several prices (the product will not be lower than the sales cost), and assume that the change of sales volume between adjacent prices is linear, and after the price is higher than the given maximum ...

Posted by modcar on Tue, 24 May 2022 15:53:06 +0300

Basic notes of C + + operator

Introduction notes to C + + Basics (III) operator Basics Whether you learn or not, C + + is there, seducing you all the time The content is based on the dark horse programmer c + + course handout. I added a small part and put it here as a reference for my review in the future. (this introductory course is highly recommended. It's available on ...

Posted by andy75180 on Tue, 24 May 2022 03:17:52 +0300

[beginners climb Leetcode79] Word Search

Leetcode79 medium\color{#FF4500}{medium}medium Click to enter the original question link: Word Search Related topics: word search II word search II [tag] backtracking search, C++ ASCII subject Discription Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell ...

Posted by snaack on Tue, 24 May 2022 01:57:25 +0300

Summary of C++ const usage

Time: 202205232202 constexpr usage summary Constants and their definitions Constants are fixed values ​​that do not change during program execution. These fixed values ​​are also called literals. Constants can be of any basic data type, including integer numbers, floating-point numbers, characters, strings, and booleans. Constants are li ...

Posted by CGRRay on Tue, 24 May 2022 00:45:05 +0300

Explain the smart pointer in C + +

preface Four smart pointers in C + +: auto_ptr, unique_ptr,shared_ptr, weak_ptr, of which the last three are supported by C++11, and the first has been abandoned by C++11. Introduction to C++11 intelligent pointer Smart pointer is mainly used to manage the memory allocated on the heap. It encapsulates the ordinary pointer as a stack object. ...

Posted by kabucek1 on Mon, 23 May 2022 07:09:43 +0300

SSL_1491 [Angel's Oath] (High Precision Subtraction)

Angel's oath topic TENSHI was very lucky to be chosen as the angel holding the key of wisdom. She must, like other newly elected angels, take an oath before taking office. The swearing ceremony is that each angel expresses his own mission, and their speeches are placed in N treasure boxes arranged in a circle. The boxes are numbered 1, 2, 3..., ...

Posted by telvitajoel on Mon, 23 May 2022 00:40:30 +0300

Da Xiong's static study notes

Written in front, This is the note I wrote after reading other people's articles, which is almost the same as the original text. In the future, I will also add the relevant things I learned in other places, that is to say, this is just my own note. Original link: https://github.com/Light-City/CPlusPlusThings/tree/master/basic_content/static Whe ...

Posted by cscheuble on Sun, 22 May 2022 16:38:40 +0300

A simplified daemon framework written by X macro

Project introduction This is a daemon framework under Linux For the purpose of project optimization and learning to master and use X Macro skills, this project skillfully uses X Macro to write a daemon management framework that can expand the number of processes arbitrarily and pass parameters. This code is extremely concise and easy to use. If ...

Posted by LukeO on Sun, 22 May 2022 04:59:18 +0300