CS8391-Data Structures
CS8391-Data Structures
QUESTION BANK
III SEMESTER
CS8391-Data Structures
Regulation – 2017
Prepared by
2. What are the postfix and prefix forms of the expression: BTL1 Remembering
A + B* (C – D) / (P – R)
3. List out the areas in which data structures are applied extensively. BTL1 Remembering
4. Define data structure with example. BTL1 Remembering
5. What is circular linked list? BTL1 Remembering
6. List out the advantage of circular linked list. BTL1 Remembering
7. Distinguish between linear and nonlinear data structures. BTL2 Understanding
8. Interpret the advantages and disadvantages of linked lists over arrays. BTL2 Understanding
9. Differentiate arrays and linked lists. BTL2 Understanding
1. Describe in detail about Polynomial manipulation in linked list. (13) BTL1 Remembering
What is a linked list? Describe the suitable routine segments for any
2. BTL1 Remembering
four operations. (13)
Examine the algorithms to implement the doubly linked list and
3. perform all the operations on the created list. (13) BTL1 Remembering
Identify the array implementation of list and show what are the
4. various operations on array?Write a procedure to insert an element in BTL1 Remembering
the middle of the array. (13)
Discuss the creation of a doubly linked list and appending the list.
5. BTL2 Understanding
Give relevant coding in C. (13)
i) State the polynomial representation for 6x3+9x2+7x+1 using linked
list. Write procedure to add and multiply two polynomial and explain
with suitable example. (7)
6. BTL2 Understanding
ii) What are the ways to insert a node in linked list? Write an
algorithm for inserting a node before a given node in a linked list.(6)
11. Explain the various operations of the list ADT with examples. (13) BTL4 Analyzing
Analyze the doubly linked list and circular linked list. Mention its
12. BTL4 Analyzing
advantages and disadvantages. (13)
Explain the steps involved in insertion and deletion into a singly BTL5 Evaluating
13. linked list. (13)
Creating
14. Develop a C program for linked list implementation of list. (13) BTL6
PART – C
Compose an algorithm to
i) Reverse the elements of a single linked lists. (5) BTL6 Creating
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 BT Level Competence
18. Differentiate between double ended queue and circular queue. BTL4 Analyzing
19. For railway reservation the queue data structure is preferred –Justify. BTL5 Evaluating
Develop an algorithm for deleting an element in a double ended
20. BTL6 Creating
queue.
PART – B
1. Describe about stack ADT using array in detail. (13) BTL1 Remembering
i)Give an algorithm for push and pop operations on stack using a
linked list with an example. (8)
2. ii)Describe the function to examine whether the stack is full() or BTL1 Remembering
empty(). (5)
Write algorithms to check if the given parenthesized arithmetic expression
BTL2
contains balanced parenthesis and to convert such expression to postfix Understanding
3. form and evaluate it. Illustrate with example. (13)
Show the procedure to convert the infix expression to postfix expression BTL3
and steps involved in evaluating the postfix expression. Convert the Applying
6. expression A-(B/C+(D%E*F)/G)*H to postfix form. Evaluate the given
postfix expression 9 3 4 * 8 + 4 / -. (13)
Discuss and write a C program to implement queue functions using BTL2 Understanding
10.
arrays. (13)
11. Explain application of queue with suitable example. (13) BTL4 Analyzing
What are circular queues. Explain the procedure to insert an element to
BTL4
12. circular queue and delete an element from a circular queue using array Analyzing
implementation. (13)
A=2,B=2,C=1,D=4,E=6,F=4,G=3. (5)
PART – A
The depth of complete binary tree is 8 and compute the number of BTL 5 Evaluating
1.
nodes in leaf.
Recommend the result of inserting 3,1,4,6,9,2,5,7 into an initially BTL 5 Evaluating
2.
empty binary search tree.
3. Define a binary tree. Give an example. BTL 1 Remembering
4. Create an expression tree for the expression. (a-b) / ((c*d) + e) BTL 6 Creating
7.
8. What are threaded binary trees? Give its advantages BTL 1 Remembering
12. Summarize tree traversal and mention the type of traversals? BTL 2 Understanding
16. List out the various operations that can be performed on B-trees BTL 1 Remembering
17. Identify the structural properties of B-Trees. BTL 1 Remembering
Illustrate the steps in the construction of a heap of records with the BTL 3 Applying
18.
following key values:12,33,67,8,7,80,5,23.
19. Analyze the properties of binary heap. BTL 4 Analyzing
Define a heap and show how it can be used to represent a priority BTL 3 Applying
20.
queue.
PART – B
Write an algorithm for preorder, inorder and postorder traversal of a BTL 1 Remembering
1. binary tree. (13)
Explain the following routines to implement the basic binary search BTL 4 Analyzing
tree operations.
2. i) Perform search operation in binary search tree. (7)
ii) Find_min and Find_max. (6)
Write an algorithm for inserting and deleting a node in a binary BTL 1 Remembering
3. search tree. (13)
Describe the concept of threaded binary tree with example. (13) BTL 1 Remembering
4.
Discuss in detail the various methods in which a binary tree can be BTL 2 Understanding
represented. Discuss the advantage and disadvantage of each
5.
method. (13)
10. Analyze the operations of B-tree using 2-3 tree with example. (13) BTL 4 Analyzing
11. Discuss about B+ tree in brief with suitable example. (13) BTL 2 Understanding
Explain the construction of expression tree with example. Give the BTL 4 Analyzing
12. applications of trees. (13)
Illustrate the construction of binomial heaps and its operations with BTL 3 Applying
13. a suitable example. (13)
14. BTL 3 Applying
i)Illustrate how the delete operation is performed on binary heap?(7)
ii)Write suitable operations for percolate up and percolate down
\operations in a binary heap. (6)
PART - C
2.
iii)Delete 11 and 10 from the above binary search tree.And display the tree
after each deletion. (4)
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) BTL 5 Evaluating
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) BTL 6 Creating
i. ii.
12
1
2 44
4
8 18
iii.
14
12 20
18
23
44
3. Find out the in-degree and out-degree of each node in the given graph BTL 3 Applying
4. Create an undirected graph and its adjacency matrix for the BTL 6 Creating
following specification of a graph G.
V(G)=1,2,3,4
E(G) ={ (1,2),(1,3),(3,3),3,4),(4,1)}
16. Prove that the number of edges in a complete graph of n vertices in BTL 5 Evaluating
n(n-1)/2
17. Given a weighted, undirected graph with |V| nodes,Assume all BTL 5 Evaluating
weights are non-negative. If each edge has weight <-w,Assess the
cost of minimum spanning tree.
18. What are Euler circuits? (N/d18) BTL 1 Remembering
19. Give two applications of graphs. BTL 2 Understanding
20. What is residual graph? BTL 1 Remembering
PART - B
1. Describe in detail about the following representations of a graph. BTL 1 Remembering
i) Adjacency Matrix (7)
ii) Adjacency List (6)
2. i) Consider the given directed acyclic graph D. Sort the nodes D by BTL 3 Applying
applying topological sort on ‘D’. (7)
A B
E F
ii.Consider the graph given below and show its adjacency list in the
memory. (6)
6. i) Discuss an algorithm for Breadth first Search on a graph. (7) BTL 2 Understanding
ii) Give an example based on the algorithm. (6)
7. i) Illustrate Kruskal’s algorithm to find the minimum spanning tree BTL 3 Applying
of a graph. (7)
ii) Trace the algorithm for the following graph. (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) BTL 1 Remembering
9. Describe an appropriate algorithm to find the shortest path from ‘A’ BTL 1 Remembering
to every other node of A for the given graph (13)
10. Discuss the prim’s algorithm for minimum spanning tree. Give an BTL 2 Understanding
example. (13)
11. i) Write a program to find an Euler circuit in a graph. (7) BTL 5 Evaluating
ii)Trace the algorithm for the given graph. (6)
3
5 V2 V3 2
V1 2
V7
3
V6 3
V4
4
V5 1
12. Develop an algorithm to compute the shortest path using Dijkstra’s BTL 6 Creating
algorithm. Validate the algorithm with suitable example. (13)
13. Explain the depth first approach of finding articulation points in a BTL 4 Analyzing
connected graph with necessary algorithm. (13)
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) For the following graph,In what order are the vertices visited
using BFS and DFS starting from vertex A?Where a choice exists,
use alphabetical order. (7)
3 Using Dijkstra’s algorithm to find the shortest path from the source BTL 6 Creating
node A. (15)
4 i) Explain weakly connected graph and strongly connected graph BTL 5 Evaluating
with example. (7)
ii) State the various graph traversal algorithm. Explain each in detail.
(8)
16. Analyzing
Compare the advantage and disadvantage of separate chaining and
BTL4
linear probing?
17. Select the best sorting method out of the following - insertion sort,
BTL5 Evaluating
quick sort and merge sort and give justification.
18. Summarize the open addressing hashing method with an example. BTL5 Evaluating
19. BTL6 Creating
Develop an algorithm for a shell sort.
20.
Prepare a simple C Program for a linear search. BTL6 Creating
PART-B
1.
Describe about selection sort with suitable example. (13) BTL1 Remembering
2.
Examine the algorithm for Insertion sort and sort the following
BTL1 Remembering
array:3,10,4,2,8,6,5,1 (13)
3. List the different types of hashing techniques? Explain them in
BTL1 Remembering
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. BTL1 Remembering
(13)
5.
Write a C program to search a number with the given set of
BTL2 Understanding
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: BTL2 Understanding
88,11,22,44,66,99,32,67,54,10. (13)
7.
Discuss the various open addressing techniques in hashing with an
BTL2 Understanding
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) BTL3 Applying
ii) Write an algorithm to sort an integer array using shell sort. (6)
10. Compare working of binary search and linear search technique with
example. (13) BTL4 Analyzing
11. Analyze extendible hashing in brief. (13) BTL4 Analyzing
12. Explain in detail about separate chaining. (13) BTL4 Analyzing
13. BTL5 Evaluating
Formulate the rehashing technique with suitable example. (13)
14. Prepare an algorithm to sort the elements using radix sort with BTL6 Creating
example. (13)
PART-C
1.
Mention the different Sorting methods and Explain about each BTL5 Evaluating
method in detailed Manner. (15)
2. Sort the sequence 96, 31, 27,42,76,61,10,4 using shell sort and radix
sort and explain the algorithm for shell sort. (15) BTL6 Creating
3. Given input {4371,1323,6173,4199,4344,9679,1989} and a hash
function h(x) =x mod 10. Prepare the resulting for the following:
i) Separate chaining hash table. (3)
ii)Open addressing hash table using linear probing. (4) BTL6 Creating
iii) Open addressing hah table using quadratic probing. (4)
iv) Open addressing hash table with second hash
h2(x)=7- (x mod 7). (4)
4. i)Write and explain non-recursive algorithm for binary search. (8)
ii) Using binary search, search the number 26 from the list of BTL5 Evaluating
numbers and give the steps. 10,7,17,26,32,92 (7)