Data Structure Model Papers (Two) 2425 (1)
Data Structure Model Papers (Two) 2425 (1)
B.TECH (III-SEM)
Theory Examination 2024-25
DATA STRUCTURES (BCS301)
Model Paper-1
SECTION B
SECTION C
3. Attempt any one part of the following: 7x1=7
𝒂. How to represent the polynomial using a linked list? Write a C program to add two polynomials using
a linked list.
𝐛. Discuss the doubly linked list. Write an algorithm to insert a node after a given node in the singly linked
list.
4. Attempt any one part of the following: 7x1=7
a. Write an algorithm for converting infix expressions into postfix expressions. Trace your algorithm for
infix expression Q into its equivalent postfix expression P, Q: A + ( B * C – ( D / E ^ F) * G ) * H
b. What is a circular Queue? Write a C code to insert an element in the circular queue.
Data: A B C D E F G H
Frequency: 22 5 11 19 2 11 25 5
b. What is a B-Tree? Write the various properties of B- Tree. Show the results of inserting the keys F, S, Q,
K, C, L, H, T, V, W, M, R, N, P, A, B in order into an empty B-Tree of order 5.
Gateway Classes
7. Attempt any one part of the following: 7 x 1 =7
a. Apply the Kruskal algorithm to calculate the cost of the minimum spanning tree for the below
graph.
b. Differentiate between DFS and BFS. Draw the breadth − first tree for the following graph:
Gateway Classes
B.TECH – (III-SEM)
Theory Examination 2024-25
DATA STRUCTURES (BCS301)
Model Paper-2
Time: 3 Hours Total Marks: 70
SECTION A
1. Attempt all Sections. If require any missing data; then choose suitably 2 x 7 = 14
a. What is the sparse matrix? How can you represent a sparse matrix in memory?
b. Explain Tail recursion.
c. Define priority queue. Give one application of priority queue.
d. Explain indexed sequential searching.
e. Define extended binary tree, full binary tree, strictly binary tree, and complete binary
tree.
f. In a complete binary tree if the number of nodes is 1000000. What will be the height of the complete
binary tree?
SECTION B
2. Attempt any three of the following: 7 x 3 = 21
a. Write a program in c to delete a particular element in the single linked list. A doubly linked list takes
more space than a single linked list for storing one extra address. Under what conditions, could a
double − linked list be more beneficial than a single − linked list?
b. Write algorithm for Push and Pop operations in the stack. Transform the following expression into
its equivalent postfix expression using stack: A + (B * C − (D / E ↑ F) * G) * H
c. Write an algorithm for Heap Sort. Use the Heap sort algorithm to sort the following elements: 2, 8, 7, 1,
3, 5, 6, 4.
d. Write the advantages of AVL tree over Binary Search Tree(BST). Insert the following sequence of
elements into an AVL tree- 7, 4, 9, 6, 30, 4, 8, 5, 3
e. Find the minimum spanning tree in the following graph using Kruskal's algorithm:
Gateway Classes
SECTION C
3. Attempt any one part of the following: 7x1=7
a. Define the Time and Space Complexity of an algorithm. Explain the role of Asymptotic notations in
determining the complexity of the Algorithm.
𝒃. How to represent the polynomial using a linked list? Write a C program to add two polynomials using
a linked list.
4. Attempt any one part of the following: 7x1=7
a. Explain circular queue. Write an algorithm to insert an item and delete an item from the Circular
queue.
b. Differentiate between iteration and recursion. Write a recursive function to print the first n
terms of the Fibonacci series.
5. Attempt any one part of the following: 7x1=7
a. Why is quick sort named as quick? Show the steps of quick sort on the following set of
elements: 25, 57, 48, 37, 12, 92, 86, 33 Assume the first element of the list to be the pivot
element.
𝐛. What is hashing? Give the characteristics of the hash function. Explain the collision
resolution technique in hashing.
𝐛. Write and explain the Floyd Warshall algorithm to find the all − pair shortest path. Use the Floyd
Warshall algorithm to find the shortest path among all the vertices in the given graph ∶