0
What is the difference between a stack and a linked list ?
c
3 Respostas
+ 3
a stack is a type of linked list
+ 2
when you push a value to the stack it is push to the top of the stack just like a stack of dishes stack on top of each other. when you want to pop it from the stack it will pop the first thing that was push to the stack
+ 1
A stack is a structure to store a number of items where the last element added is the first element that can be removed.
-A linked list is one of the possible way to implement a stack. But a linked list can also be used for other things such as Queues implementations.
- And stack can also be implemented using arrays instead of linked lists.