Exploration of Java principle: the principle and implementation of CLH and MCS lock of AQS technology system

background SMP(Symmetric Multi-Processor) Symmetric multiprocessor architecture is a widely used parallel technology compared with asymmetric multiprocessing technology. In this architecture, a computer is composed of multiple CPUs and shares memory and other resources. All CPUs can access memory, I/O and external interrupts equally ...

Added by jauson on Sat, 11 Dec 2021 08:07:05 +0200

[LeetCode single linked list] circular linked list (141)

1. Title Give you a head node of the linked list to judge whether there are links in the linked list. If there is a node in the linked list that can be reached again by continuously tracking the next pointer, there is a ring in the linked list. In order to represent the rings in a given linked list, the evaluation system uses the inte ...

Added by feyd on Wed, 08 Dec 2021 04:17:46 +0200

Detailed explanation of Java linked list -- easy to understand (super detailed, including source code)

catalogue concept Classification of linked lists Structure of linked list Code implementation linked list 1. Create node class 2. Create linked list Method 1: enumeration method Method 2: head interpolation public void addFirst(int data) Method 3: tail interpolation public void addLast(int data) 3. Print linked list: public void displ ...

Added by syd on Mon, 06 Dec 2021 00:31:07 +0200

springboot -- more secure database druid

Spring boot associated druid First of all, why do we use this database connection pool? A large part of our development is around the database. When we operate on the database, we need to go in and out of the database connection pool to obtain the connection with the database. Therefore, an efficient and safe database connection pool has becom ...

Added by sunsun on Wed, 01 Dec 2021 13:31:24 +0200

[Java data structure] binary tree classic OJ interview questions - brush notes + problem solving ideas

πŸ“’ Blog home page: πŸ€ Bryant typing the codeπŸ€ πŸ“’ Welcome to praise πŸ‘ Collection ⭐ Leaving a message. πŸ“ Welcome to discuss! πŸ‘ πŸ“’ This article was originally written by [Bryant who knocked the code], and was first launched in CSDN πŸ™‰πŸ™‰πŸ™‰ πŸ“’ Since the blogger is learning Xiaobai, there will inevitably be mistakes. If you have any questions, ...

Added by wacook on Wed, 01 Dec 2021 07:20:51 +0200

06_JavaScript data structure and algorithm one-way linked list

JavaScript data structure and algorithm (VI) one way linked list Cognitive linked list Linked lists and arrays Like arrays, linked lists can be used to store a series of elements, but the implementation mechanism of linked lists and arrays is completely different. array Storing multiple elements, arrays (or lists) are probably the most co ...

Added by sifix on Tue, 30 Nov 2021 03:31:37 +0200

Basic functions of single linked list (add, delete, change, query, find length and sort)

Linked list is a common data structure. It is different from common arrays. When using an array, you must first specify the number of elements contained in the array, that is, the length of the array. However, if the elements added to the array exceed the size of the array, you cannot save all the contents.    the number of elements ...

Added by Aptana on Sun, 28 Nov 2021 19:08:06 +0200

Zero basis of algorithm - count array

catalogue Introduction (counting method and counting array) Sum of unique elements Find all missing numbers in the array Number of good pairs Check that all characters appear the same number of times The first unique character in the string Introduction (counting method and counting array) We often use an odd element to count the ...

Added by irbrian on Fri, 26 Nov 2021 21:55:49 +0200

Linked list diagram (bidirectional, circular linked list + addition and deletion of linked list)

1. Two way linked list Bidirectional linked list is that each node has two pointer fields, pointing to the front and rear nodes of the node respectively. Therefore, the data reading of bidirectional linked list is bidirectional, which is more convenient for data modification. Β  Construction of bidirectional linked list: #include<io ...

Added by paddyhaig on Fri, 26 Nov 2021 17:18:31 +0200

leetcode valid parentheses and circular queues

1. Valid brackets This topic comes from leetcode valid parentheses 1.1 Title Description Tips 1.1.1 interface function bool isValid(char * s){ } 1.2 general framework Although the array can also solve the problem, it is not very good. Some problems will appear later. We try to use the stack to solve the problem Directly using ...

Added by N350CA on Mon, 22 Nov 2021 04:28:16 +0200