Linked
Linked
All components
within the list are of same data type stored in nodes. Thus it is also a homogenous data structure.
To locate a specific node in the list, we must sequentially traverse through the list (Sequential
access). In a linked list, each item is allocated a space in memory as it is added to the list. A link is
kept between each item with the next item in the list. Each node of the list has following two
elements:
Queues Queue is also a linear data structure of dynamic height, which contains single type of
data. Thus it is a homogenous data structure, all components of which are of same data type. A
queue is, also, called a First-In-First-Out (FIFO) system, in which insertion of a component can
take place only at one end, called “rear” end of the queue and deletion of a component can take
place only at other end, called “front” end of the queue (Sequential access). The word “queue” is
thus like the queue at a counter for service, in which customers are dealt with in the order in which
they ar- rive.
Stacks Stack is a linear data structure of dynamic height, all components of which are of same data
type (Homogenous components). A stack is also called a Last-In- First-Out (LIFO) system, in
which insertion and deletion of any component can take place only at the top of the stack, where
‘top’ is an end of the stack. That is, at any given time, the only item, which can be accessed to, is
on the top of the stack (sequential access). A common example of a stack is a dish or a coin
stacker. Dish- es are "pushed" onto the top and "popped" off the top.