725. Separate linked list
One question per day on September 22, 2021
Given a linked list whose head node is root, write a function to separate the linked list into k consecutive parts.
The length of each part should be as equal as possible: the length difference between any two parts cannot exceed 1, that is, some parts ma ...
Posted by jurdygeorge on Thu, 23 Sep 2021 15:01:05 +0200
Container is a software environment that provides necessary support for the operation of a specific component. IoC refers to Inversion of Control
Components assembled in IoC container need some kind of "injection" mechanism
For example, a component needs a datasource. Instead of creating a datasource, it waits for the ...
Posted by Pryach on Thu, 23 Sep 2021 13:58:19 +0200
JVM01 - JVM Memory Structure
1.JVM Learning Route
2. Program counters
The process from the java code in the computer to the execution is: source code to byte code, binary byte code to jvm instruction, handed to the interpreter, the interpreter to machine code, executed by the CPU. Just like this, the jvm instruction is execute ...
Posted by cody7 on Wed, 22 Sep 2021 23:40:12 +0200
One or more Producers place data in a buffer after productionA single consumer fetches data from the buffer for processingOnly one producer or consumer can access the buffer at any time
Using semaphores to solve the producer consumer problem
Only one thread can operate the buffer at any time (mut ...
Posted by jfeather on Wed, 22 Sep 2021 20:23:59 +0200
The difference between process oriented and object-oriented
Process oriented: the main concerns are: the specific process of implementation, causality [development idea of integrated graphics card] Advantages: for programs with simple business logic, rapid development can be achieved, and the early investment cost is low.
Posted by carobee on Wed, 22 Sep 2021 17:47:07 +0200
Starting from this section, we will formally enter the study of concurrent programming design pattern. First, we will talk about the observer design pattern. We will start with the java design pattern, and then transition to the observer pattern of concurrent programming
1, What is the observer design pattern?
About what is t ...
Posted by whitelion on Wed, 22 Sep 2021 16:10:37 +0200
What is Mybatis?
MyBatis is an excellent persistence layer framework.It supports custom SQL, stored procedures, and advanced mapping.MyBatis eliminates almost all JDBC code and the work of setting parameters and obtaining result sets.MyBatis can configure and map primitive types, interfaces and Java POJO s (Plain Old Java O ...
Posted by ClyssaN on Wed, 22 Sep 2021 15:44:35 +0200
For example, hot data cache (such as reports and star cheating), object cache and full page cache can improve the access data of hot data.
2. Data sharing distributed
String type, because Redis is a distributed independent service that can be shared among multiple applications
For example: distributed Session
Posted by KoshNaranek on Wed, 22 Sep 2021 14:12:56 +0200
To understand this problem, we should understand two concepts: what is passing by value and what is passing by reference
call by value: refers to copying and passing the value of the actual parameter to the function when calling the function, so that if the parameter is modified in the function, the actual parameter will not be affected
Posted by douceur on Wed, 22 Sep 2021 04:07:55 +0200
Today, let's talk about how to create a generic array?
Some people may say that this is not simple. Just T array = new T[size]?
Unfortunately, the compiler will prompt that generics cannot be instantiated directly. Let's change our thinking. First create an Object array and then convert it to the corresponding generic. Is that ok?
Posted by anindya23 on Tue, 21 Sep 2021 23:10:00 +0200