Linked list, single linked list, two-way (one-way) circular linked list

dynamic chain Single linked list: //Head node refers to the first node in the linked list, which can be divided into real head node and virtual head node; (1) Real head node: the first node is used to store data (usually the real head node is used). (2) Virtual head node: the first node cannot store data. (3) Header pointer: it is just a ref ...

Added by ataylor20 on Mon, 17 Jan 2022 07:54:50 +0200

c++ sort() function and its application

sort() function: it is a sort function in c++ stl library. Learning to use this function can greatly save us from writing a sort function, such as bubble sort (O(n2)). Moreover, this sort function is written by quick sort, so the time complexity is O(nlogn), so it can also greatly reduce the program running time. Note that the sorting range is ...

Added by diondev on Mon, 17 Jan 2022 06:52:35 +0200

Data structure - linear table notes

Linear table Definition and characteristics of linear table A linear table is a finite sequence of data elements with the same characteristics. Linear list: an ordered sequence composed of n (n > = 0) data elements (nodes) a1,a1,... An. definition: 1. The number n of data elements is defined as the length of the table. 2. When n=0, it ...

Added by zrueda on Mon, 17 Jan 2022 06:36:54 +0200

4. n queen problem

▲ in graph theory, there are two ways of traversing trees: breadth first traversal and depth first traversal Breadth first traversal (BFS): starting from an un traversed node of the graph, traverse the adjacent nodes of the node first, and then traverse the adjacent nodes of each adjacent node in turn (i.e. traversal layer by layer) For example ...

Added by New Coder on Mon, 17 Jan 2022 04:53:27 +0200

DFS thought and examples

The so-called Brute force is to list all possible situations, and then check them one by one to find the answer. This method is simple, direct, does not play tricks, and makes use of the powerful computing power of the computer. Violence laws are often synonymous with "inefficiency". However, compared with other "efficient&quot ...

Added by nyk on Mon, 17 Jan 2022 03:43:03 +0200

C/C + + language data structure quick start (code parsing + content parsing) queue

1, Basic concepts of queue Note: three elements of data structure - logical structure, data operation and storage structure (physical structure) Different storage structures lead to different implementations of operations 1. Definition of queue A linear table is a finite sequence of n (n > = 0) data elements with the same data type, whe ...

Added by stiphu on Mon, 17 Jan 2022 02:13:54 +0200

Educational Codeforces Round 111 problem solving Report

Type gym on the JSCPC and make mistakes in the last two hours to make clear the arrangement of teammates. I like the C question QAQ very much And why D is a little difficult, is it a little crooked... A.Find The Array Portal Description Duplicate element sets satisfy: (1) 1 in the set; (2) If a ...

Added by anushka on Mon, 17 Jan 2022 02:10:09 +0200

Digital statistics DP

preface Review the content of the basic course of acwing algorithm. This article is to explain the basic algorithm: dynamic programming - digital statistics DP. About time complexity: bloggers are not very good at computing at present. They will make up for it in the future. 1, Dynamic programming Dynamic Programming (DP) is the proc ...

Added by phait on Sun, 16 Jan 2022 21:54:13 +0200

Detailed explanation of heap and code implementation of Binary Heap

catalogue 1, Definition and introduction of heap 2, How to store binary heap with array? 3, Insert an element into the maximum heap Shift up 4, Remove the element from the maximum heap Shift Down 5, Summary 1, Definition and introduction of heap Heap is a special data structure in computer science. A heap is usually an array object ...

Added by j_70 on Sun, 16 Jan 2022 19:51:47 +0200

DCGAN - use paddlepaddle2 0 implementation

DCGAN - use paddlepaddle2 0 implementation brief introduction Dcgan (deep convolution generation countermeasure network), which is composed of a generation model and a discrimination model. The generation model is used to generate pictures, and the discrimination model is used to distinguish the authenticity of the generated pictures. Continu ...

Added by cdog5000 on Sun, 16 Jan 2022 18:34:15 +0200