CS3301 DS Imp Que
CS3301 DS Imp Que
CS3301 DS Imp Que
UNIT-I
PART-A
5. Define Dequeue.
A dequeue is an ordered list in which additions and deletions may be carried out at either end.
Disadvantages:
d. Nodes of a linked list cannot be accessed directly. To access a particular node accessing
should start only from the beginning.
e. To store a single data, along with data, memory must be allocated for a pointer also, which
wastes memory.
8. Define Singly Linked List.
A singly linked list is a list structure in which each node contains a single pointer field
that points to the next node in the list, along with a data field.
PART-B
1. Develop an algorithm for operations in a singly linked list.
2. Describe in detail about Polynomial manipulation in linked list.
3. Examine the algorithms to implement the doubly linked list and perform all the
operations on the created list.
4. Develop an algorithm for operations in a circularly linked list.
UNIT- 2
PART-A
1. Define stack?
Stack is an ordered collection of items into which new items may be inserted and from
which items may be deleted at one end, called the top of stack.
5. Define Dequeue.
A dequeue is an ordered list in which additions and deletions may be carried out at either end.
6. What are the limitations in the stack, when array used as home of stack?
The Array is finite collection of elements and in stack the number of elements is
unlimited. As the stack dynamically changes the attempts to insert more elements than the
array size cause overflow
8. Define Queue?
A queue is an ordered collection of items from which items may be inserted at one end
called rear end and into which items may be deleted at the other end called the front end.
PART-B
UNIT-III
PART-A
1. Define Tree.
A Tree is a collection of one or more nodes with a distinct node called the root , while
remaining nodes are partitioned as T1 ,T2, ..,Tk , K≥ 0 each of which are sub trees, the edges of
T1,T2,…,Tk are connected the root.
The value in any left subtree is less than the value of its parent node.
The value in any right subtree is greater than the value of its parent node.
10.Define balanced search tree.
Balanced search tree have the structure of binary tree and obey binary search tree properties
with that it always maintains the height as O(log n) by means of a special kind of rotations. Eg.
AVL, Splay, B-tree.
13.What is a min-heap?
A min-heap is a mirror image of the heap structure. It is a complete binary tree in which
every element is less than or equal to its children. So the root of the min-heap contains the
smallest element.A B-tree of order m in an m-way search tree that is either empty or is of height
≥1 and
2. All nodes other than the root node and failure nodes have at least m/2 children.
A Binary Heap is a complete binary tree in which the key value of any node must be
lesser than its children is called min heap. If the key value of any node is greater than its children
is called max heap.Binary heap is also called as partially ordered tree.
PART-B
1. Write an algorithm for preorder, inorder and postorder traversal of a binary tree.
2. Write an algorithm for inserting and deleting a node in a binary search tree.
3. Construct B Tree of order m=5 for the following keys
1,12,8,2,25,5,14,28,17,7,52,16,48,68,3,26,29,53,55,45.Delete the keys 8 and 55.State
therules for deletion.
4. Discuss how to insert an element in a AVL tree and explain with algorithm.
5. Write suitable operations for percolate up and percolate down operations in a binary heap.
UNIT - 4
PART-A
1. Define Graph.
A Graph G, consists of a set of vertices V, and a set of edges E.V is a finite non-empty set
consisting of vertices of vertices of the graph. The set of edges E consists of a pair of vertices
from the vertex set.
1. Discuss in detail about depth-first search and breadth-first search traversal of a graph with suitable
examples.
2. Discuss any two applications of Graph with example.
UNIT-V
PART-A
1. Define sorting
Sorting arranges the numerical and alphabetical data present in a list in a specific order
or sequence. There are a number of sorting techniques available. The algorithms can be
chosen based on the following factors
– Size of the data structure
– Algorithm efficiency
– Programmer’s knowledge of the technique.