Container adapter stack,queue and priority_queue
catalogue
I What is a container Adapter
II Stack stack
2.1 introduction to stack
2.2 use of stack
2.3 simulation implementation of stack
III Queue queue
3.1 queue introduction
3.2 use of queue
3.3 simulation implementation of queue
IV priority_queue priority queue
4.1priority_queue introduction
4.2 priority_queue usage
4.3 simulati ...
Added by wiredweb on Sat, 15 Jan 2022 05:23:48 +0200
LeetCode 32. Longest valid bracket
Topic Overview:
Title link: Ask me to do the problem
Problem
1. Unpassable Violence Algorithms
_To be honest, the first thing I thought of was this method, but it would exceed the time limit. _Its idea is simple, two-tier loops find each substring, and then use the stack to determine if each substring is a valid substring, which is simpler ...
Added by tinyang on Wed, 12 Jan 2022 19:16:39 +0200
js stack to realize the function of parsing json string
Give you a json string without using eval and json In the case of parse and new functions, write your own functions and parse them into json objects. How would you implement them?One of the characteristics of json is that arrays and objects can be nested with each other, and there are infinite levels of nesting, which is also the most troubleso ...
Added by dreamwest on Mon, 10 Jan 2022 11:08:04 +0200
[tree] establish a binary tree stored in a binary linked list + traverse the binary tree (first order, middle order, second order, sequence)
Establish binary tree stored in binary linked list + traverse binary tree (first order, middle order, second order and sequence)
1. Establish a binary tree stored in a binary linked list
1-1. principle
The construction of binary tree uses the principle of recursion. When building a binary tree according to the pre order sequence, in order to ...
Added by Poomerio on Mon, 10 Jan 2022 06:33:27 +0200
Rehabilitation type force buckle brushing notes d2
catalogue
Code part
Question 9
Question 13
Question 14
Question 20
Question 4
Question 21
Question 15
java small knowledge part
Question 9
Question 13
Question 14
Question 20
Question 4
Question 15
Code part
Question 9
Give you an integer X. if x is a palindrome integer, return true; Otherwise, false is returned.
Palindr ...
Added by XeroXer on Thu, 06 Jan 2022 00:17:12 +0200
Data structure - simulate queue with Stack & simulate stack with queue
Two stacks S1 and S2 are used to simulate a queue.
Two stacks S1 and S2 are used to simulate a queue. When an element needs to be inserted into the queue, S1 is used to store the input element, that is, S1 performs the stack operation. When it is necessary to get out of the queue, the stack operation is performed on S2. Since the order of t ...
Added by a2bardeals on Mon, 03 Jan 2022 17:18:15 +0200
Linear tables -- stacks and queues
The column is used to write the basic code definitions and algorithm problems of each data structure, which is convenient for sorting out ideas.
The algorithm questions in this article are mainly encountered during personal learning. Because some of them correspond in LeetCode, the question number is attached for reference & only for pers ...
Added by Akito on Sun, 02 Jan 2022 15:26:05 +0200
LeetCode_Stack_331. Verify Preorder Serialization of a Binary Tree (Java) [stack, string processing]
catalogue
1, Title Description
English description
Chinese description
Examples and descriptions
2, Problem solving ideas
1. Stack merge node
2. Calculate the input and output
3, AC code
Java
Stack
Calculate access
4, Problem solving process
First Bo
Second stroke
1, Title Description
English description
One way to se ...
Added by inkel on Sun, 26 Dec 2021 15:13:38 +0200
Computer experiment of data structure (Chapter 3) II
Computer experiment of data structure (Chapter III) I
1. Input n (input by the user) numbers within 10, insert them into queue i every time i(0 ≤ i ≤ 9) is input, and finally connect the non empty queues in 10 queues into a chain in the order of queue number from small to large, and output all elements of the chain.
Algorithm idea: e ...
Added by rallen102 on Sun, 26 Dec 2021 12:35:17 +0200
⭐ Introduction to algorithm ⭐ Stack monotone stack simple 01 - LeetCode 155 Minimum stack
🙉 If you don't eat or drink, you must brush the questions 🙉
C language free animation tutorial, punch in with me!
🌞 Daylight science C language 🌞
LeetCode is too hard? Look at the simple questions first!
🧡 100 cases of introduction to C language 🧡
Difficult data structure? It doesn't exis ...
Added by darknuke on Sun, 26 Dec 2021 08:38:21 +0200