## Hand in hand to teach you the introduction series -- stack (big talk data structure)

Stack is a linear table that is restricted to delete and insert operations only at the end of the table. How to understand the data structure of "stack"? Here is a more appropriate chestnut. The pistol is a typical "stack". When heroes in TV programs use pistols, they usually fill the bullets first, and then shoot the bull ...

Added by thyscorpion on Thu, 03 Mar 2022 13:17:46 +0200

## Pre middle suffix expression, inverse Polish calculator, infix to suffix

catalogue Prefix expression Infix expression Suffix expression (inverse Polish) Inverse Polish calculator code implementation Infix to suffix expression Prefix expression Prefix expression is also called polish. The operator of prefix expression is before the operand. For example: (3 + 4) * 5-6 corresponding prefix expressi ...

Added by telvitajoel on Thu, 24 Feb 2022 18:31:10 +0200

## [actual combat] valid parentheses of LeetCode illustrated by ACM players

Hello, everyone. I'm handsome. Today, let's judge whether the brackets are valid. I don't know what to say. Let's start the whole thing. LeetCode 20: valid parentheses meaning of the title Given a string s that only includes' (',') ',' {','} ',' [','] ', judge whether the string is valid. Examples Input: s = "() [] {}" Outpu ...

Added by ccx004 on Sun, 20 Feb 2022 09:42:30 +0200

## Stack and queue exercise sorting

catalogue 1, Bracket matching problem 2, Implement a minimum stack 3, Implement queue with stack 4, Implement stack with queue 4.1} implement stack with two queues 4.2 implementing stack with a queue 5, Design cyclic queue 6, Next larger element 1, Bracket matching problem The title is described as follows: Solution idea: use th ...

Added by kettle_drum on Sat, 19 Feb 2022 21:41:16 +0200

## Using C + + to realize linked stack (with linked list as the underlying data structure)

1. What is a chain stack? Since the allocation of each element in the stack in memory is not continuous, the connection between elements is realized through a pointer in each element node. As shown below: It can be seen that the head of the linked list is used as the top of the stack. 2. Comparison between sequential stack and chain stac ...

Added by social_experiment on Sat, 12 Feb 2022 05:52:15 +0200

## Recognize stacks and queues

Recognize stacks and queues What is stack, JVM virtual machine stack and stack frame? ✌️ Stack: a linear table with limited operation, which is limited to linear tables with insertion and deletion operations only at the end of the table. This end is called the top of the stack, and the other end is called the bottom of the stack. Inserting a ...

Added by iwanpattyn on Sun, 30 Jan 2022 01:53:48 +0200

## How are C + + objects distributed in memory

Function reference returns analysis memory Here we allow you to connect the code used in the previous copy structure. You can review the previous text for easy understanding Copy construction in C + + class Object { int value; public: Object() { cout << "Object::Object" << this << endl; } Object(int x = 0) :value( ...

Added by moehome on Fri, 28 Jan 2022 23:33:23 +0200

## 7-1 symmetrical sorting (25 points)

7-1 symmetrical sorting (25 points) The title comes from PTA You work for the albatross circus with a group of ugly stars as pillars. You have just completed a program that outputs their list in non descending order according to the length of the stars' name string (that is, the length of the current name is at least the same as that of th ...

Added by Eclesiastes on Mon, 17 Jan 2022 10:23:11 +0200

## Stack implementation arithmetic expression evaluation

Arithmetic expression evaluation A typical problem solved by stack is the evaluation of arithmetic expressions, such as "3 + 4 * 2 - (1 + 1) #". In the process of expression calculation, it is not calculated immediately after reading an operation, but compared with the following operators to determine which one to calculate first. In ...

Added by uncleronin on Mon, 17 Jan 2022 08:35:40 +0200

## [algorithm question - Sword finger Offer] detailed analysis: image of binary tree and stack containing min function

Image of JZ18 binary tree (simple) subject describe Operate the given binary tree and transform it into a mirror of the source binary tree. For example: source binary tree     8   /     \ 6     10 / \     /   \ 5 7   9  11 Mirror binary tree      8   /      \ 10     6 / \      /  \ 11 9  7 5 Example Input: {8,6,10,5,7,9,11} Return ...

Added by danoli3 on Sun, 16 Jan 2022 10:03:56 +0200