answersLogoWhite

0

Array: A contiguous block of memory. When you know the position of the nth element of an array, you know that the elements at n+1 and n-1 are very nearby in memory.

Stack: A first-in-last-out data structure. A stack can be backed by most generic data structures (even arrays), but the linked-list type seems to be most common. You can think of a stack like a stack of playing cards. You can put a bunch of cards facedown on a table, and when you draw from the stack, you can only take the topmost card. The "first-in-last-out" means that the card that you put down first can't be removed until you remove all cards on top of it.

Queue: A first-in-first-out data structure. Very similar to a stack in regards to data storage. Think of this one like a line of people. The first person in the line is the first one to get out of it, and everyone behind them has to wait their turn.

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

ReneRene
Change my mind. I dare you.
Chat with Rene
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake

Add your answer:

Earn +20 pts
Q: What are the differences between Stack Arrays Queues tabular Form?
Write your answer...
Submit
Still have questions?
magnify glass
imp