528 Programming and Data Structures
SU MM AR Y
1) The list implemented using an array is called static list. A list is a series of linearly arranged
numbers of the same type. The list can be of basic data type or custom data type.
2) Static implementation can be done using arrays.
3) The simple list can be created using an array in which elements are stored in successive memory
locations.
4) In the list, we have n, (n -1) as predecessor and (n+1) as successor elements. In other words, for
any number in the list, there exist a left element to it as predecessor and the right element as
successor. The first element does not have a predecessor and the last element does not have a
successor.
5) A linear list belonging to list subclass is called a stack. The insertion of an element onto the stack
is called as 'push' and deletion operation is called 'pop.'
6) A queue is a non-primitive, linear data structure, and a subclass of list data structure. It is an
ordered, homogenous collection of elements in which elements are appended at one end called
rear end and elements are deleted at other end called front end.
7) In a single linked list, two successive nodes of the linked list are linked with each other in a
sequential linear manner.
8) In a double linked list, the data structure holds two pointer fields. In the single linked list, the
address of only the next element is pointed. In addition, in a double linked list the addresses of
next as well as preceding elements are linked with the current node.
EXERC ISES
A) Answ er the following questions.
1) Explain stack and queues.
2) Explain representation of stack and queues.
3) Distinguish between a stack and a queue.
4) Make a distinction between static and dynamic implementations.
5) Explain insertion and deletion processes with stack and queues.
6) Explain a single linked list.
7) What is a header? Explain its role in the linked list.
8) Explain insertion and deletion operations with a single linked list.
9) Explain a double linked list.
10) What are the applications of stacks and queues? Explain briefly.
11) What are the different types of queues available? Explain their representation with linked
lists.
B) Select the appropriate option for each o f the following questions.
1) The stack is based on the rule
a) first in last out b) last in first out
c) both (a) and (b) d) first in first out
2) The push () operation is used
a) to insert an element b) to remove an element
c) to move an element d) all of the above