链接队列类的入队方法和链接堆栈的推入方法之间有什么区别吗? [英] Is there any difference between the enqueue method of the linkedqueue class and the push method of the linkedstack?

查看:156
本文介绍了链接队列类的入队方法和链接堆栈的推入方法之间有什么区别吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

LinkedQueue类的enqueue方法和LinkedStack的push方法之间是否有区别?

我尝试过的事情:

我想了很多,却没有找到.但它是.请帮我解决这个问题,请

Is there any difference between the enqueue method of the LinkedQueue class and the push method of the LinkedStack?

What I have tried:

I thought a lot and i didn''t find it. but it is. help me with this problem please

推荐答案

首先,您必须了解队列和堆栈.队列和堆栈都是数据结构,但是在添加和删除对象的顺序上有所不同.阅读此堆栈与队列之间的差异 [ LinkedQueue.java [LinkedStack.java [ ^ ]
First, you have to learn about Queue and Stack. Both queue and stack are data structures but differ in the order where objects are added and removed. Read this Differences Between Stack and Queue[^].
Both methods are to add items to the respective data structures. Find out more on LinkedQueue.java[^] and LinkedStack.java[^]


这篇关于链接队列类的入队方法和链接堆栈的推入方法之间有什么区别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆