栈和队列

栈和队列——python 一、栈 定义一个栈 栈的应用——括号匹配问题 栈的应用——迷宫问题 二、队列 自定义队列 python队列的内置模块 队列应用——打印文件后五行 队列应用——迷宫问题 python的数据结构与算法之栈与队列 阅读详情

1.可查询最值的栈

定义栈的数据结构,请在该类型中实现一个能够得到栈最小元素的min函数。

方法一.

class Solution {
public:
    stack <int> stackdata;
    stack <int> stackmin;
    void push(int value) {
        stackdata.push(value);
        if(stackmin.empty()||value<stackmin.top())
            stackmin.push(value);
        else
            stackmin.push(stackmin.top());
    }
    void pop() {
        if(!stackdata.empty())
        {
            stackdata.pop();
            stackmin.pop();
        }
    }
    int top() {
        return stackdata.top(); 
    }
    int min() {
        return stackmin.top();
        
    }
};

使用一个额外栈来保存栈当前的最小值,例如1 2 1 5 4 3,两个栈里面的内容回是这样:

1    1

2    1

1    1

5    3

4    3

3    3

方法二.

class Solution {
public:
    stack <int> stackdata;
    stack <int> stackmin;
    void push(int value) {
        stackdata.push(value);
        if(stackmin.empty()||value<=stackmin.top()) {
            stackmin.push(value);
        }
    }
    void pop() {
        if(!stackdata.empty() && !stackmin.empty()) {
            if (stackdata.top() == stackmin.top()) {
                stackmin.pop();
            }
            stackdata.pop();
        }
    }
    int top() {
        return stackdata.top();
    }
    int min() {
        return stackmin.top();
    }
};

使用一个额外栈来保存栈当前的最小值,例如1 2 1 5 4 3,两个栈里面的内容回是这样:

1    

2    

1    

5    1

4    1

3    3

2.双栈队列

利用两个栈实现一个队列的操作,需要注意两点:

(1)另外一个栈不为空时,不能倒入。

(2)如果要倒入的话,需要全部倒入。

class TwoStack {
public:
    vector<int> twoStack(vector<int> ope, int n) {
        stack<int> in;
        stack<int> out;
        vector<int> result;
        for(int i=0;i<n;++i)
        {
            if(ope[i]!=0)
            {
                in.push(ope[i]);
            }
            else
            {
                if(!out.empty())
                {
                    int temp=out.top();
                    out.pop();
                    result.push_back(temp);
                }
                else
                {
                    while(!in.empty())
                    {
                        int temp=in.top();
                        in.pop();
                        out.push(temp);
                    }
                    int temp=out.top();
                    out.pop();
                    result.push_back(temp);
                }
            }
        }
        return result;
    }
};

3.栈的反转练习

把vector当作一个栈来使用

class StackReverse {
public:
    vector<int> reverseStack(vector<int> A, int n) {
        reverse(A);
        return A;
    }
    void reverse(vector<int> &A)
    {
        if(A.empty())
            return;
        else
        {
            int last=get(A);
            reverse(A);
            A.push_back(last);
        }
        
    }
    int get(vector<int> &A)
    {
        int res=A.back();
        A.pop_back();
        if(A.empty())
            return res;
        else{
            int last=get(A);
            A.push_back(res);
            return last;
        }
    }
};

4.双栈排序

返回递增顺序的numbers数组。

class TwoStacks {
public:
    vector<int> twoStacksSort(vector<int> numbers);
};
vector<int> TwoStacks::twoStacksSort(vector<int > numbers)
{
    vector<int> ivc;
    int data;
    while(!numbers.empty())
    {
        data=numbers.back();
        numbers.pop_back();
        while(!ivc.empty()&&data>ivc.back())
        {
            numbers.push_back(ivc.back());
            ivc.pop_back();
        }
        ivc.push_back(data);
    }
    return ivc;

}

5.滑动窗口

方法一:

不适用辅助数据结构,暴力法,求解每个窗口内的最大值。

class SlideWindow {
public:
    int get_win_max(vector<int>&arr, int l, int r) {
        int max = 0;
        for (int i = l; i <= r; ++i) {
            if (arr[i] > max) {
                max = arr[i];
            }
        }
        return max;
    }
    vector<int> slide(vector<int> arr, int n, int w) {
        
        if(arr.empty()||w>n)
            return arr;
        //vector<int> res;
        vector<int> res(n-w+1);
        for (int i = 0; i <= n - w; ++i) {
            //res.push_back(get_win_max(arr, i, i+w-1));
            res[i] = get_win_max(arr, i, i+w-1);
        }
        
        return res;
    }
};

方法二:

利用双端队列,保持队列里面的对手元素值最大。

class SlideWindow {
public:
    vector<int> slide(vector<int> arr, int n, int w) {
        
        if(arr.empty()||w>n)
            return arr;
        vector<int> res(n-w+1);
        int index=0;
        deque<int> qmax;//存的是数组的下标
        for(int i=0;i<n;++i)
        {
            while(!qmax.empty()&&arr[qmax.back()]<=arr[i])//给貌似少的操作和明晰的条件,加条件判断
            {
                qmax.pop_back();
            }
            qmax.push_back(i);//尽量给正常的操作,减少判断条件,或者没有条件
            if(qmax.front()<i-w+1)//if(qmax.front()<i-w+1)都是可以的
                qmax.pop_front();
            if(i>=w-1)
            {

                //res.push_back(arr[qmax.front()]);不能push_back,虽然后面的数字正常,但是会导致前面输出000..
                res[index++]=(arr[qmax.front()]);
            }
        }
        return res;
    }
};

6.数组变树

根节点是最大的节点,对于子树也同样如此。

class MaxTree {
public:
    vector<int> buildMaxTree(vector<int> A, int n) {
    
        vector<int> leftMax(n);
        vector<int> rightMax(n);
        vector<int> res;
        stack<int>left,right;
          
        for(int i = 0;i<n;++i){
            while(!left.empty()&&A[left.top()]<A[i])
                left.pop();
            if(left.empty())
                leftMax[i] = -1;
            else
            leftMax[i] = left.top();
            left.push(i);
        }
        for(int i = n-1;i>=0;--i){
            while(!right.empty()&&A[right.top()]<A[i])
                right.pop();
            if(right.empty())
                rightMax[i] = -1;
            else
            rightMax[i] = right.top();
            right.push(i);
        }
          
        for(int i = 0;i<n;++i){
            if(leftMax[i] == -1&&rightMax[i] == -1)
                res.push_back(-1);
            else if(leftMax[i] == -1)
                res.push_back(rightMax[i]);
            else if(rightMax[i] == -1)
                res.push_back(leftMax[i]);
            else if(A[leftMax[i]]<A[rightMax[i]])
                res.push_back(leftMax[i]);
            else
                res.push_back(rightMax[i]);
        }
        return res;
    }
};

栈和队列算法总结 二、栈和队列          目录:        1.设计含min函数的栈,要求min、push和pop的时间复杂度都是o(1)。        2.设计含min函数的栈的另解        3.用两个栈实现队列        4.用两个队列实现栈          5.栈的push、pop序列是否一致        6.递归反转一个栈,要求不得重新申请一个同样的栈,空间复杂 阅读详情

相关推荐

如何打开本地网络的防火墙端口(Windows版)解决ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。问题

ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 最开始在遇到这个报错的时候十分不解,后来经过思考,有可能是服务器端口占用,或者并没有放行。因此搜查问题的关键是要先去排查问题。 在搜索栏输入控制面板 选择防火墙 选择开关 保证这些选项是开着的 选择高级设置 新建规则 创建协议端口 选择端口 允许连接 点击下一步 创建规则后点击下一步(后命名) 选择任意端口ALL即可 问题排查完毕!socket创建网络通信时,有读者

weixin_46900108的博客 9万+

【栈和队列】C语言简单应用 ⌊栈和队列互相实现,循环队列⌉

栈和队列简单应用

qq_62852431的博客 2299

wsl2 配置ubuntu 固定ip

wsls ubuntu 设置固定ip

musk1212的博客 2616

C# 栈和队列

/求栈的长度//判断栈是否为空//清空操作//入栈操作T Pop();//出栈操作T Peek();//取栈顶元素}//取得队列长度的属性//求队列的长度//判断对列是否为空//清空队列//入队//出队T Peek();//取队头元素。

钢铁男儿 1359

C语言由scanf(“%d“,)非法输入字符造成的死循环及其解决方案

声明:此文章仅作为C语言学习历程中的思路整理,用于解决入门阶段较为浅显的问题,如有错误还请指正。 现象描述: 代码要求实现用户输入1或2,通过scanf("%d",&a)读取这个值,从而判断分属于1或2的两种情况。输入非1,2的数字都应该返回"Invalid Number!",并且要求重新输入数字。 while(a!=1&&a!=2) { printf("Invalid Number!\n"); printf("Enter the number:"); scan

weixin_49764077的博客 8719

《小白入门:无人机电调 ESC 的 PWM 接口特性、主流协议与使用指南》

电调是无人机的 “动力中枢”,其 PWM 接口是入门的基础,而 SBUS、DroneCAN 等协议则代表了更高阶的控制方式。小白学习时,需先掌握 PWM 的基本特性和连接方法,再根据场景选择合适的协议,同时严格遵守使用注意事项(如电源匹配、校准步骤、安全操作)。随着实践深入,逐步理解 “协议差异” 和 “系统协同”,才能让无人机更稳定、安全地飞行。

bother3000的博客 3769

栈和队列简介

栈和队列是插入和删除操作受阻的线性表栈:先进后出只能插入在表尾,删除时先删最后一个元素(表尾元素)队列:先进先出只能插入在表尾,删除时先删第一个元素(表头元素)存储结构:用顺序栈或链栈存储均可,但以顺序栈更常见逻辑结构:与线性表相同,仍为一对一关系存储结构:顺序队或链队,以循环顺序队列更常见逻辑结构:与线性表相同,仍为一对一关系约定an为栈顶,a1为栈底基本操作:初始化、入栈、出栈、销毁、清空、取栈顶元素等表尾即an端称为队尾,表头即a1端,称为队头。

lhr056813的博客 1430

postman响应体:“msg“: “请求缺失签名Sign“、 “msg“: “请求缺失时间戳“

请求标头有Sign、Timestamp,但是直接将网址复制到postman时,Headers没有自动生成这两个参数,所以运行时会报错。

m0_46862648的博客 1706

栈和队列特别篇:栈和队列的经典算法问题

栈和队列特别篇:栈和队列的经典算法问题(保姆级教程)

ChrisJamesljl的博客 1673

DeepSeek与YOLO融合技术的微信小程序实现方案

本文介绍了一个基于微信小程序和Flask后端的智能图像检测系统。系统采用DeepSeek-7B进行自然语言理解,YOLOv8执行目标检测,并通过融合验证模块确保结果准确性。核心流程包括:用户通过小程序上传图片和文本需求,后端解析意图后执行目标检测,最后验证并返回结果。关键技术包括DeepSeek的指令理解、动态阈值调整和模型优化(ONNX、TensorRT)。系统适用于工业质检等场景,如"检测表面划痕",能自动识别目标并验证结果。部署需GPU服务器,并包含安全机制保障系统稳定运行。

老郑的博客 273

YOLOv8性能突破:DySample超轻量动态上采样算子的创新应用与实现【附保姆级代码】

YOLOv8(You Only Look Once Version 8)作为YOLO系列模型的最新版本,延续了高效、准确的目标检测优势。其基础结构包含了骨干网络(Backbone)、检测头(Head)、以及特征融合层(Neck)。在特征融合阶段,YOLOv8需要对不同尺度的特征图进行上采样,以便将低分辨率的特征与高分辨率的特征进行融合。传统的上采样操作多使用插值(如双线性插值)或固定卷积,而这些方法可能无法很好地适应复杂的上下文信息。

一键难忘的博客 3120

数据结构栈和队列

栈:一种特殊的线性表,其只允许在固定的一端进行插入和删除元素操作,,栈中的数据元素遵守LIFO(last in first out)的原则压栈:栈的插入操作叫做进栈/压栈/入栈,出站栈:栈的删除操作叫做出栈,

ZerO_on的博客 883

【DRAM存储器四】DRAM存储器的架构演进-part1

详述以提升吞吐量为目标的DRAM架构变化

highman110的博客 1249

栈和队列的转化

栈与队列的相互转换栈和队列是两种基本的数据结构,它们在许多算法和程序中都有应用。虽然栈和队列在概念上是完全不同的,但是我们可以使用两个栈来实现一个队列,或者使用两个队列来实现一个栈。这种转换在某些情况下可能非常有用,例如,当我们的编程环境只提供了栈或队列的实现,但我们需要使用另一种数据结构时。在这篇博客中,我们将详细介绍如何使用两个栈来实现一个队列,以及如何使用两个队列来实现一个栈。我们将提供详细的代码示例,并解释每个函数的工作原理。提示:以下是本篇文章正文内容,下面案例可供参考。

xiaobai230811的博客 1550

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

栈和队列的应用

栈和队列的题目解析

2402_82658387的博客 803

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

【Java】栈和队列

本文主要介绍了栈、队列和循环队列的基本概念与实现。同时,通过对其模拟实现进一步了解其底层实现;

qq_51914226的博客 1009

栈和队列学习总结

一、栈 1、特点及应用 先进后出。(如果会和队列先进先出记混的话,就记场景吧:弹栈弹栈,就是把最上面的最新进来的弹出去;而队列就像我们火车站排队检票出站一样,谁排在前面谁就先出去。) 应用的话,其实我们经常接触呀。比如Undo操作(就是撤销操作)就是使用的栈的思想,以及程序调用的系统栈。下面我们举一个经典的括号匹配的例子: 题目要求: 给定一个只包括...

Marmara 1万+

栈和队列算法题

在学习了栈和队列的相关概念并且在之前也实现了栈和队列,接下来我们就来试着写一些栈和队列的算法题,在这些算法题当中将会使用到之前实现的栈或者队列,栈、队列在这当中将会变为工具一样,我们就会像工具一样拿着它们去解决问题,相信通过本篇算法题的解决,你会对栈和队列有更深层次的理解,一起加油吧!

mljy.博客 1552

栈和队列详解

栈:一种特殊的线性表,其只允许在固定的一端进行插入和删除元素操作。进行数据插入和删除操作的一端称为栈顶,另一端称为栈底。概念:只允许在一端进行插入数据操作,在另一端进行删除数据操作的特殊线性表,队列具有先进先出FIFO。//队列有效元素个数。压栈:栈的插入操作叫做进栈/压栈/入栈,入数据在栈顶。//队列为空,队头和队尾都是newnode。//获取栈中有效元素个数。//获取栈中有效元素个数。//定义队列结点的结构。//定义栈的数据结构。

zwb649588050的博客 952

【数据结构】栈和队列

本文系统介绍了栈和队列两种基础数据结构。栈遵循"先进后出"原则,仅允许在固定端进行插入和删除操作;队列遵循"先进先出"原则,在一端插入,另一端删除。文章详细分析了双端队列和循环队列的实现原理,包括角标移动公式、有效长度计算等核心算法。同时比较了链表和数组两种实现方式的复杂度差异,并展示了Java集合框架中Stack类和Queue接口的具体使用方法。通过限制操作方式,任何线性结构都能实现栈或队列的特性,为程序设计提供了灵活的数据组织工具。

2503_92883549的博客 1181

栈和队列的实现

啥是栈?啥是队列?你想知道的这里都有

xbhinsterest11的博客 2196

【Leetcode】队列实现栈和栈实现队列

【Leetcode】队列实现栈和栈实现队列

旋律 | 话语 | 色彩 | 情景 1033

【栈和队列】java实现栈和队列以及集合中的栈和队列

【栈和队列】java实现栈和队列,让大家更加深刻的认识栈和队列

程序员良辰 1054

用队列实现栈和用栈实现队列

用队列实现栈和用栈实现队列

Jambo!的博客 463
上一篇: 道具管理
下一篇: 背包系统
Ftworld21
博客等级 码龄14年 150粉丝 527原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值