• ## The interviewer asked me to write the queue by hand. I almost didn’t write it

Time：2022-5-14

preface Stack and queue are a pair of good brothers. We introduced an article on stack earlier (stack, not LIFO). The mechanism of stack is relatively simple. LIFO is like entering a narrow cave. The cave has only one entrance and exit and can onlyLast in first out。 The queue is like a tunnel, and […]

• ## [PHP data structure] relevant logical operations of queue

Time：2022-5-13

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 […]

• ## Go data structure ice breaking road – (III) circular queue

Time：2022-2-15

queue definition //A linear table whose structure is open at both ends //The end that is allowed to be deleted is called the head of the team //The end that allows insertion is called the end of the queue //Write out the construction structure of the queue according to the definition (assuming that there are […]

• ## 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 […]

• ## [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, […]

• ## [data structure and algorithm] queue

Time：2020-3-5

queue Queue is a first in, first out (FIFO) data structure, which is different from stack, just like queuing. Generally, it is only allowed to view and add elements at the end of the team, and view and delete elements at the head of the team. The queue is usually implemented by double linked list, […]