Thursday, August 20, 2009

TWO MARKS QUESTIONS AND ANSWERS



21. Define ADT (Abstract Data Type)?
An ADT is a mathematical model with a collection of operations defined
on that model.

22. Define Linear data structure?
Linear data structures are data structures having a linear relationship between
its adjacent elements. Eg. Linked List.

23. Define Non Linear data structure?
Non Linear data structures are data structures don’t have a linear relationship
between its adjacent elements, but had the hierarchical relationship. Ex. Graph,
Tree.

24. What are different types of Linked List?
Single linked list
Double linked list
Circular linked list

25 What are different types of Circular Linked List?
Circular Single linked list
Circular double linked list

26 List the basic operations carried out in a linked list?
a. Creation of list
b. Insertion of list
c. Deletion of list
d. Modification of list
e. Traversal of List

27 Define a stack?
Stack is an ordered collection of elements in which insertions and deletions
are restricted to one end. The end from which elements are added and /or removed
is referred to as top of the stack. Stacks are also referred as “piles” and “push-down
lists”.

28 Define a queue?
Queue is an ordered collection of elements in which insertions and deletions
are restricted to one end. The end from which elements are added and / or removed
is referred to as the rear end and the end from which deletions are made is referred
to as front end.

29 Difference between Arrays and Linked List?
Arrays Linked List
Size of any array is fixed Size of list is variable
It is necessary to specify the number of elements during declaration
It is not necessary to specify the number of elements during declaration
Insertion and deletions are difficult and costly
Insertions and deletions are done in less time
It occupies less memory than a linked list
It occupies more memory
Coding is easy Careful coding is needed to avoid memory errors.


30 What is single linked list?
It is a linear data structure which consists a pointer field that points to the
address of its next node(successor) and the data item.

No comments:

Post a Comment