2022 postgraduate entrance examination 820 data structure review
Chapter 2 linked list (2)
This article is used to record the code involved in the review of data structure, the problems encountered and the solutions
Wang Tao after class exercises
2.2 delete all nodes with the value of X and free up their space; The node with value x is not unique
void Del_x(LinkList &L, int x){
LNode *q = L ...
Added by fatherlyons on Sat, 18 Dec 2021 04:18:04 +0200
JavaScript data structure and algorithm
JavaScript data structure and algorithm (I)
Preface: This article mainly explains and discusses the common data structures in programming languages, and uses JavaScript for encapsulation, because as we all know, JavaScript is a weak type language, not only does not have type detection, but also some practical and efficient data structures such ...
Added by whare on Sat, 18 Dec 2021 01:49:43 +0200
Reverse linked list problem
1 recursively reverse the entire linked list
For recursive algorithms, the most important thing is to clarify the definition of recursive functions. Specifically, our reverse function is defined as follows:
Enter a node head,take「with head As the starting point」The linked list of is inverted and returns the head node after inversion.
Und ...
Added by stickynote427 on Sat, 18 Dec 2021 00:39:12 +0200
Canal source code analysis series - communication data structure of canal
The protocol module mainly defines the communication protocol between client and server. The data transmission of canal consists of two parts. One part is to convert binlog into the Message defined by us during binlog subscription, and the other part is the TCP protocol for transmission between client and server. These two parts adopt protobuff ...
Added by adavis on Sat, 18 Dec 2021 00:16:21 +0200
Data structure experiment 9 (sorting algorithm)
Of course, this is also the last experiment of data structure. It has brought us deep thinking through the previous 9 experiments. Now it should be greatly improved for programming algorithms and very good for problem solving. I think now for me, the programming ability has made a qualitative leap. Thank you for this data structure course, whic ...
Added by Peredy on Fri, 17 Dec 2021 20:41:49 +0200
C language - linked list (one-way linked list, two-way linked list)
1. Introduction to linked list structure
We have learned the use of arrays in the previous chapters. The space of arrays is continuous and the size of arrays is constant. In many application scenarios of dynamic data storage, it is inconvenient to use; The linked list structure introduced in this article supports the dynamic addition and relea ...
Added by peddel on Fri, 17 Dec 2021 20:23:42 +0200
Android bitmap cache strategy, understand these, and come to Alibaba directly
How to avoid consuming too much traffic? When the program loads a picture from the network for the first time, it caches it on the mobile device, so that when the picture is used again, it does not need to download it from the network again, saving traffic for users.
At present, a commonly used cache algorithm is lru (least recently used). It ...
Added by redmonkey on Fri, 17 Dec 2021 19:51:33 +0200
PCL: Octree realizes the nearest neighbor search within the radius of point cloud
Octree octree
Octree (octree) structure is a data model first proposed by Dr. Hunter in 1978. Octree structure divides the geometric entities in three-dimensional space by volume elements, and each volume element has the same time and space complexity. The geometric objects in three-dimensional space are divided by cyclic recursive division me ...
Added by walkonet on Fri, 17 Dec 2021 10:41:09 +0200
Heap sorting, some related knowledge of heap
What is a heap
Maybe the concept is not well understood. Let's look at two pictures below.
So here comes the question...? The set of data we give can't be so coincidental. It happens to be orderly. At this time, we will introduce an algorithm: the downward sorting algorithm of the heap. Make a group of numbers that are not so ...
Added by srikanthiv on Fri, 17 Dec 2021 02:37:42 +0200
Analysis of get and put methods of ConcurrentHashMap
In the interview, I often ask about JUC. The common one is CHM. Let's talk about the methods and operations of different versions of CHM
The underlying implementation of CHM in JDK7 is implemented by segmented segment array. Segment contains hashentries, and each HashEntry forms a linked list.
Common get methods:
First, obtain the lock of se ...
Added by Spudgun on Thu, 16 Dec 2021 22:22:17 +0200