Data structure experiment 4 implementation of basic operations of stack and queue

Experimental purpose Master the abstract data types of stack and queue, and be able to correctly select them in corresponding application problems, Master the implementation methods of stack and queue (sequential and chained), the implementation algorithms of two storage structures and basic operations, pay attention to the judgment condition ...

Added by homer09001 on Mon, 20 Dec 2021 22:44:07 +0200

[learning 100 million points every day] - OJ questions of stack and queue

1. Implement stack with queue graphic Since two queues are used to implement the stack, it must be related to the nature of the queue. It must be changed back and forth. Let's take a look at this process. code implementation typedef struct { Queue* q1; Queue* q2; } MyStack; /** Initialize your data structure here. */ M ...

Added by jstarkey on Mon, 20 Dec 2021 06:19:59 +0200

Leetcode.239. Maximum value of sliding window --- violence / optimized violence / monotone queue

239. Maximum value of sliding window Give you an integer array nums, with a sliding window of size k moving from the leftmost side of the array to the rightmost side of the array. You can only see k numbers in the sliding window. The sliding window moves only one bit to the right at a time. Returns the maximum value in the sliding window. Ex ...

Added by alexcrosson on Tue, 23 Nov 2021 03:23:56 +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

FreeRTOS learning notes

FreeRTOS programming conventions port means interfaceint type is never used, only short and long types are used. In the MCU of Cortex-M kernel, short is 16 bits and long is 32 bitsData type redefinition is implemented in the header file portmacro.h *In keil, the default char is unsigned Variable prefix The prefix of char type variable is c,T ...

Added by hoolahoops on Wed, 17 Nov 2021 14:45:49 +0200

Data structure notes - queue

1, Type definition of queue A queue is a linear table that is limited to inserting only at the end of the table and deleting only at the header. The tail of the table is called the rear, the header is called the front, and the table without elements is called an empty queue. In addition to all the characteristics of linear table, queue has it ...

Added by cybaf on Mon, 01 Nov 2021 05:47:17 +0200

Initial knowledge and basic OJ exercises of stack and queue

  this article only uses two common implementation methods - dynamic array stack and chain queue. If you want to see more implementation methods of queue and stack, you can see the section on queue and stack in my following article: Figure 5 implementation of five interfaces,    the queue and stack implementations in this articl ...

Added by deezerd on Sun, 31 Oct 2021 21:37:21 +0200

Of hand tearing data structure -- queue

catalogue Concept and structure of queue Implementation of queue Array queue Chain queue Implementation of chain queue Initialize queue Queue Out of queue Get queue header element Get queue tail element Gets the number of valid elements in the queue Check whether the queue is empty Destroy queue Implement all the code of the queue ...

Added by anauj0101 on Sat, 30 Oct 2021 06:42:51 +0300

[learning notes] what do you know about queues, monotonous queues and cyclic queues? (implemented in C language)

queue Basic concepts Queue is a first in first out (FIFO) data structure.For a queue, the end of the table is called the tail, and the end of the header is called the front.All elements can only enter from the end of the queue. The operation of entering the queue is called joining the queue.At the same time, all elements can only be ejected ...

Added by Pethlehemm on Mon, 27 Sep 2021 06:04:49 +0300

Stack and queue interview

Written earlier, this article is some questions about stack and queue asked by the interviewer during my interview. The answer to the question is summarized by myself. There may be some deviations. Please correct it If there are more problems in the follow-up, we will continue to add 1. What linear tables do you know? What about nonlinear ...

Added by kwdelre on Tue, 21 Sep 2021 06:16:07 +0300