• ## [selected sword fingers] the problem of “symmetric binary tree” from a macro perspective

Time：2021-12-31

Title Description This is from niuke.com“JZ 58 symmetric binary tree”, difficulty is“Difficulties”。 Tag: “sword finger offer”, “binary tree”, “sequence traversal”, “iteration”, “recursion” Description: Please implement a function to judge whether a binary tree is symmetrical. Note that if a binary tree is the same as the mirror image of the binary tree, it is defined […]

• ## Small five algorithm series – stack and queue

Time：2021-11-10

Hello, all brave friends, Hello, I’m your strong mouth king, Xiao Wu. I’m healthy and my brain is not sick I have rich hair loss skills, which can make you a senior It’s my main idea to write as soon as I see it. It’s my characteristic to pick my feet. There’s a trace of […]

• ## C language realizes the basic operation of circular (sequential) queue

Time：2021-10-24

#include<stdio.h> #include<stdlib.h> #define MaxSize 10 #define TRUE 1 #define ERROR 0 typedef int Status; typedef int ElemType; typedef struct { ElemType *base; // Array base address, dynamically allocate memory int front; // Head pointer int rear; // Tail pointer }Queue; Status InitQueue(Queue* Q); // initialization Status InsertQueue(Queue* Q, ElemType e);// Join the team Status DeleteQueue(Queue* […]

• ## [PHP data structure] logical operations related to queues

Time：2021-10-17

In the logical structure, we have learned a very classic structure type: stack. Today, let’s learn another classic logical structure type: queue. I believe many students have used cache queue tools such as redis and rabbitmq. In fact, database and program code can realize the operation of queue. Just like stack, queue also has its […]

• ## Queue based on actual PHP data structure

Time：2021-10-2

What is a queue Queue is another linear data structure that follows the first in first out principle. The queue has two ends for operation, one end out of the queue and one end in the queue. This feature is different from the stack. Only one end of the stack can be used for operation. […]

• ## [detailed illustration] learning queue, just read this one!

Time：2021-9-13

Key points: This paper mainly introduces the structure, basic principle and operation of queue, involving two implementations: sequential queue and chain queue. 1. What is a queue? Let’s take a daily example and queue up to buy food. Everyone lined up in front of the window to buy food in the order of first come, […]

• ## How to implement queue data structure in JavaScript

Time：2021-9-12

To be an excellent developer, you need knowledge from multiple disciplines. However, on the basis of understanding the programming language, you must also know how to organize the data so that you can easily and effectively manipulate the data according to the task. This is what data structures do. In this article, I will describe […]

• ## [data structure and algorithm: simple method] talk about the implementation of priority queue

Time：2021-8-10

[recommended reading of series articles] [sequence table of data structure] use diagrams and codes to make you understand the linear table of sequence structure [linked list of data structure] after reading this article, I finally understand the linked list [stack of data structure] understand the “stack” with detailed graphics and text (principle chapter) [queue of […]

• ## Kafka0.8 producer exception handling

Time：2021-8-8

order This article briefly analyzes the exception handling of Java producer in Kafka version 0.8.2.2. survey Kafka’s Java producer is sent asynchronously, mainly in several steps: Append to recordaccumulator The sender takes out the recordbatch from the recordaccumulator and sends it to the client Networkclient deals with broker and sends recordbatch This involves exceptions in […]

• ## Restricted linear list queue (sequential storage and chained storage)

Time：2021-5-4

1. Queue overview 1.1 queue definition A queue is a linear table that only allows insertion at one end and deletion at the other.A queue is a first in first out linear tableThe end that can be inserted is called the end of the team, and the end that can be deleted is called the […]

• ## Leetcode 101. Symmetric binary tree | Python

Time：2021-4-13

101. Symmetric binary tree subject Given a binary tree, check whether it is mirror symmetric. For example, a binary tree [1,2,2,3,4,4,3] is symmetric. 1 / \ 2 2 / \ / \ 3 4 4 3 But the following [1,2,2, null, 3, null, 3] is not mirror symmetric: 1 / \ 2 2 \ \ […]

• ## Source code analysis of abstractqueuedsynchronizer

Time：2021-4-12

summary Abstract queued synchronizer (AQS) provides an abstract implementation of synchronizer framework. Concurrency classes such as reentrantlock, semaphore, countdownlatch and cyclicbarrier are all implemented based on AQS. The specific usage is to inherit AQS to implement its template method, and then take subclasses as internal classes of synchronization components. Source code analysis Member variable Head […]