DS Important Questions
DS Important Questions
IMPORTANT QUESTIONS
SEM / YEAR: IIISem/ II Year
Q.No Questions
1. Define ADT. Give any two examples.
Identify the array implementation of list and show all its operation.
4.
(13)
Discuss the creation of a doubly linked list and appending the list.
5.
Give relevant coding in C. (13)
Write C code for singly linked list with insert, delete, display
6.
operations using structure pointer. (13)
Analyze and write C code for circular linked list with create, insert,
10.
delete, display operations. (13)
11. Explain the various operations of the list ADT with examples. (13)
Analyze the doubly linked list and circular linked list. Mention its
12.
advantages and disadvantages. (13)
Explain the steps involved in insertion and deletion into a singly
13. linked list. (13)
14. Develop a C program for linked list implementation of list. (13)
PART – C
Recommend an algorithm to add two polynomials
1. 5x2+3x+15,2x2+6x+3 when the polynomials are represented during
singly linked lists. (15)
Compose an algorithm to
i) Reverse the elements of a single linked lists. (5)
2.
ii) count the number of nodes in a given singly linked list.(5)
iii) Searching the element from linked list. (5)
PART - A
Q.No Questions
1. Define stack and specify the operations
2. List any four applications of stack?
Given the prefix for an expression. Write its postfix:
3.
-*-+abc/ef-g/hi
4. Given the infix for an expression, write its prefix a*b/c+d.
Discuss the postfix and prefix forms of the expression?
5. A+B*(C-D)/(P-R)
6. Illustrate the purpose of top and pop?
7. What causes underflow of stack? How it could be avoided?
8. How to implement stack using linked list.
Summarize the rules followed during the infix to postfix
9.
conversions.
10. Generalize a routine to return top element in a stack using linked list.
11. Define double ended queue.
12. List the applications of a queue.
13. What are the applications of priority queue?
14. What is circular queue?
15. Circular queue is better than standard linear queue, Why?
16. Classify the different types of queues.
17. Show a routine to perform enqueue operation in a queue.
19. For railway reservation the queue data structure is preferred –Justify.
PART – A
Q.No Questions
16. List out the various operations that can be performed on B-trees
17. Identify the structural properties of B-Trees.
Illustrate the steps in the construction of a heap of records with the
18.
following key values:12,33,67,8,7,80,5,23.
19. Analyze the properties of binary heap.
Define a heap and show how it can be used to represent a priority
20.
queue.
PART - C
5 10 12
2.
21
6
H 2. 3
14
ii) Delete three elements from the merged Binomial Queue. (7)
i) Draw B-Tree of order m = 5 for the keys {K,
O,S,V,M,F,B,G,T,U,W} (5)
3. ii) Delete the keys K and G in order. (5)
iii) Justify the number of splits needed for inserts / delete with
proper reasons. (5)
4. Construct AVL tree for the followings after rotation. (5+5+5)
i. ii.
12
12
4 44
8 18
iii.
14
12 20
18
23
44
A B
E F
ii.Consider the graph given below and show its adjacency list in the
memory. (6)
7
1 2
1 6 1
5
3 4 5
3 5
8. Compare any two applications of Graph with your own example.(13)
9. Describe any one of the shortest path algorithms with suitable
example. (13)
10. Discuss the prim’s algorithm for minimum spanning tree. Give an
example. (13)
11. i) Write a program to find an Euler circuit in a graph. (7)
ii)Trace the algorithm for the given graph. (6)
3
5 V2 V3 2
V1 2
V7
3
V6 3
V4
4
V5 1
PART –C
1 Consider the graph G given below. The adjacency list of G is also
given. Evaluate the steps needed to print all the nodes that can be
reached from the node H (including H itself).One alternative is to
use a depth-first search of G starting at node H. (15)
2 i) Formulate the minimum spanning tree for the following graph. (8) BTL 6 Creating
1 6
A B C
3
1
3 2
4
D E F
1 4
ii) Generalize any two applications of depth first search. (7)
3 Using Dijkstra’s algorithm to find the shortest path from the source
node A. (15)
PART – A
Q.No Questions
1. What is hashing?
2. Define extendible hashing and give its significance.
3. What is meant by internal and external sorting? Give any two
examples for each type.
4.
List the different types of searching
5. Define rehashing.
6. Identify the advantage of shell sort over insertion sort.
7.
Give the time complexities of insertion sort .
8. Give the types of collision resolution.
9. Interpret the fastest searching algorithm and give reason.
10. Distinguish between linear and binary search technique.
11. Classify the different sorting methods.
12. Apply insertion sort and sort the following elements
3,1,4,1,5,9,2,6,5
13. Which hashing technique is best and illustrate with an example?
14. Analyze why do we need a hash table as a data structure as
compared to any other data structure?
15. Point out the advantages of using open addressing.
16. Compare the working of separate chaining and open addressing
techniques.
17. Select the best sorting method out of the following - insertion sort,
quick sort and merge sort and give justification.
18. Summarize the open addressing hashing method with an example.
19.
Develop an algorithm for a shell sort.
20.
Prepare a simple C Program for a linear search.
1.
Describe about selection sort with suitable example. (13)
2.
Examine the algorithm for Insertion sort and sort the following
array: 77, 33, 44, 11, 88, 22, 66, 55 (13)
3.
List the different types of hashing techniques? Explain them in
detail with an example. (13)
4. Show the result of inserting the keys 2, 3, 5, 7, 11, 13, 15, 6, 4 into
an initially empty extendible hashing data structure with M = 3.
(13)
5.
Write a C program to search a number with the given set of
numbers using binary search. (13)
6.
Interpret an algorithm to sort a set of ‘N’ numbers using bubble sort
and demonstrate the sorting steps for the following set of numbers:
88,11,22,44,66,99,32,67,54,10. (13)
7.
Discuss the various open addressing techniques in hashing with an
example. (13)
8.
i) Sort the given integers and Show the intermediate results using
shellsort:35,12,14,9,15,45,32,95,40,5. (7)
ii) Write an algorithm to sort an integer array using shell sort. (6)
***************