AJAY KUMAR GARG ENGINEERING COLLEGE,
GHAZIABAD
DEPARTMENT OF IT/CSE
Pre University Test
Course: B. Tech Semester: 3rd
Session: 2022-23 Section:IT-1,2,3/ CSIT-1,2,3
CSE-1,2,3 /CS-1,2 /AIML
CSE(AIML)-1,2 /CSE(DS)
Subject: Data Structure Sub. Code: KCS-301
Max. Marks: 100 Time: 3 hours
OBE Remarks:
Q. No 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
CO No. 1 1 2 1 4 3 4 4 5 5 1 3 3 1 1 4 4 5 5 1
Bloom’s
Level* L2 L1 L2 L2 L4 L3 L7 L1 L1 L1 L2 L2 L4 L3 L3 L5 L5 L5 L5 L5
(L1 to
L6)
Weightage CO4: 26 Weightage CO5: 24
*Bloom’s Level: L1: Remember, L2: Understand, L3: Apply, L4: Analyze, L5: Evaluate, L6:
Create
Note: Answer all the sections.
Section-A (10*2 = 20)
1. What do you understand by time space tradeoff?
2. Define Abstract Data Type.
3. Discuss the significance of priority queue.
4. Differentiate between underflow and overflow in linked list?
5. Derive the formula to calculate the height of a binary tree.
6. What are in-place sorting algorithms? Give at least 2 example
7. Discuss the adjacency matrix. Give an example.
8. Define Complete binary tree and extended binary tree. Discuss with an example.
9. Distinguish between trees and a graph
10. What is the Transitive closure of a graph.
Section-B
Attempt Any Three parts. (3*10 = 30)
11. Discuss the implementation of singly-linked list. Write C functions to implement following
operations on singly-linked list.
(i) to count the number of nodes.
(ii) to insert node as last node.
12. What is hashing? Briefly explain probing as collision resolution techniques in hashing.
13. Write an algorithm for quick sorting, by using it sort the numbers: 10, 25,16, 5, 35, 48, 8
14. Can you find a unique tree when any two traversals are given? Using the following
traversals construct the corresponding binary tree:
INORDER: H K D B I L E A F C M J G
PREORDER: A B D H K E I L C F G J M
Also find the Post Order traversal of obtained tree
15. Suppose multidimensional array P and Q is given as P(-2:2, 2:22) and Q(1:8.-5:5,-10:5)
stored in row major order:
i) Find the length of each dimension of P and Q
ii) The number of elements in P and Q
iii) Assume base address of Q=400, w=4. Find effective indices E1, E2 and E3 and
address of element Q [Link]
Section-C
Attempt all the parts. (5*10 = 50)
16. Attempt any one question
a) Describe Kruskal algorithm and find the minimum spanning tree using Kruskal algorithm.
Also find the total cost of the MST.
b) Describe Dijikstra algorithm and Apply Dijikstra algorithm to find the shortest path on the
following graph
17. Attempt any one question
a) Perform the Heap Sort on the following set of Elements. Show every step mentioning
Operation performed:
90 100 20 150 30 40 10 120 80 60
b) How is binary search different from linear search? Apply binary search to find item 40 in
the sorted array: 11, 22, 30, 33, 40, 44, 55, 60, 66, 77, 80, 88, 99. Also discuss the complexity
of binary search.
18. Attempt any one question
a) Define B-Tree. Construct a B-Tree for the following sequence of input for order 5:
10 20 30 40 50 60 70 80 90 100 200 250 28 11 22
b) Explain the Huffman algorithm. Construct Huffman tree for PARAGRAPH with its
optimal code?
19. Attempt any one question
a) Explain with example the concept of threaded binary tree? List the advantages and
disadvantages of it.
b) What is height balanced tree. Why is it used? Balance the tree with following insertion
order
71, 41, 91, 56, 60, 30, 40, 80, 50, 55
20. Attempt any one question
a) Differentiate between iteration and recursion. Also write the recursive solution for Tower of
Hanoi problem.
b) Write the C function to implement the insertion and deletion operation in circular queue.