Data structure - algorithm and program design

1, Experimental purpose Understand and master the type definition method of linear table.Master the basic operations in the sequence table, including the creation of the sequence table, the addition and deletion of elements, and the basic operations such as empty and full judgment. 2, Experimental requirements [Title 1 - three methods of fun ...

Posted by dswain on Sun, 16 Jan 2022 09:22:29 +0100

C + + standard - C++14 features

1, Variable template Before C++11, we only had templates for classes and functions. In C++14, a variable template is added: template<class T> constexpr T pi = T(3.1415926535897932385L); template<class T> T circular_area(T r) { return pi<T> *r * r; } Variable templates can also be used in class variables: template&lt ...

Posted by hrdyzlita on Sun, 16 Jan 2022 07:05:48 +0100

c + + classical sorting algorithm

c + + various classical sorting algorithms Starting today, write down what you have learned about looking for a job. 1, Various sortalgorithm Time and space complexity and stability of ⭐⭐⭐⭐⭐ 2, (various) sortalgorithm When is the best and worst case (especially fast platoon) 3, Bubbling sort⭐⭐⭐⭐ ​ // Bubble sort the two adjacent element ...

Posted by rohanm02 on Sun, 16 Jan 2022 05:56:44 +0100

[LeetCode] determine a binary tree

preface This paper shows the topics related to determining a binary tree in LeetCode, which readers can use to write by dictation to check whether they are familiar with the relevant algorithms. The difficulty is medium. LeetCode topic Related topic types Related links 105 Constructing binary tree from preorder and inorder traversal sequ ...

Posted by mazman on Sun, 16 Jan 2022 05:50:18 +0100

Principle, design and implementation of thread pool

Principle and implementation of thread pool 1. What is a thread pool Thread pool is a form of multi-threaded processing. Threads are created in advance and placed in a queue for management. When a task needs to be processed, the task is assigned to a specific thread for execution. Improve performance by reducing thread creation, destruction, ...

Posted by sharpmac on Sun, 16 Jan 2022 05:19:29 +0100

C++ Getting Started, Beginning

Preface Tip: Here you can add a general description of what this article will record: For example: With the continuous development of artificial intelligence, machine learning is becoming more and more important. Many people have started learning machine learning. This paper introduces the basic content of machine learning. Tip: The f ...

Posted by Rommeo on Sun, 16 Jan 2022 04:23:28 +0100

QT + Gaode Map Web Service API development - search input prompt demoqt UI layout, build request URL, slot function and QT network access

QT-UI layout The simple arrangement in the early stage is good, and it may be adjusted in the future The following is a brief description of the following figure: lineEdit is used to input information, ListWidget is used to display the final prompt information, and TextBrowser is used to print the obtained XML file, which can be deleted lat ...

Posted by Drebin on Sun, 16 Jan 2022 03:11:48 +0100

Right value reference and its function

I. what are left and right values? Before mastering the right value reference, you must first know what the right value is. Since there is an right value, there must be an left value. When we assign a=b, the value that can be placed to the left of the = sign is the left value, and the reverse is the right value. So what value can be used as a ...

Posted by davey10101 on Sun, 16 Jan 2022 02:37:26 +0100

Algorithm basic enumeration

t1 fake coin poj1013 Idea: First of all, you should know that the subject already knows the weighing results, and each input is three groups of data, so define three character arrays to store three groups of data of the left balance, three groups of data of the right balance and three groups of data of the weighing results, and then define an ...

Posted by bizshop on Sat, 15 Jan 2022 23:50:47 +0100

Joseph problem (array + queue + formula iteration + recursion)

Joseph problem (array + queue + formula iteration + recursion) The Joseph Ring problem originates from a Jewish story: The Romans captured the bridge Tapat, and 41 people hid in a cave to escape the catastrophe. Among the 41 people, the historian Josephus (Joseph) and one of his friends. The remaining 39 people decided to commit collective sui ...

Posted by QbertsBrother on Sat, 15 Jan 2022 22:59:10 +0100