Queue and Stack. Confuse???????

Can anyone expalin what is different between Queue and stack.
Why in this example of queue they didnt use function front.
In my understanding the difference between the stack and queue is queue have front while stack have top.
Is this true?

Why in this example of queue they didnt use function front.

We cannot see what "this" you are referring to.
A very apologise to keskiverto. i misunderstand about it. Now I noticed I wrong.
closed account (SECMoG1T)
We can still help.
Absolutely I need all of you to help me especially in coding. I'm freshman that still in process of learning programming.
Are you from India? If yes, are you asking this question because day after tomorrow you have your board exams?I am asking because I have too.
Last edited on
No my friend abeginner23235616. I'm malaysian that still in studies of programming. Nice to meet you.
Actually my exam also just around the corner. Hope you can help me too.
A queue and a stack are both data structures which hold multiple elements of the same type. With a queue, the first element to be added is the first that can be removed. In a stack, the last element that was put in is the first element that can be removed. So a queue is First In, First Out, while a stack is Last In, First Out.
Topic archived. No new replies allowed.