DSA FAT Model Question Paper

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

FAT MODEL QUESTION PAPER NOV 2023

Programme : B.Tech
Course Title : Data Structures and Algorithms Code : CSE2001
Time : 02:00 Hours Max. Marks : 60
Part A- Answer all the Questions
1. a) Construct Binary Search Tree for the following sequence.
6,4,7,9,12,5,8,10,11,3,17
10
b) Delete the root node, node 9, node 10 in-order and show the BST after deleting
each node.

2. Construct the Binary tree from the following Post-order and In-Order traversal.
In-Order: 54 65 18 15 77 25 43 52 97 62
10
Post-Order: 54 65 15 25 77 18 43 97 62 52

3. Sort the following array of elements using divide and conquer methodology
without a pivot element.
A= {56,12,34,59,65,9,75,98,24,91}
10
Illustrate each iteration with neat sketch.
Find the time complexity of above-mentioned sorting elements and justify your
answer.

4. Sort the following array using the algorithm which sorts a sequence A using a
simple recursive approach. The main idea is to apply the divide-and-conquer
technique, whereby we divide A into sub-sequences based on pivot value, recur
to sort each subsequence, and then combine the sorted sub-sequences by a
simple concatenation. 10
A= {75,25,30,58,49,18, 71,11,9,52}
Illustrate each iteration with neat sketch. Find the time complexity of the sorted
array.

5. Given input {471, 123, 673, 99, 43, 979, 89} and a hash functions are h 1(n) =
(5n+n) and h2(n) = (3n+25) use division methodology to store this values in the
hash table. Perform the following hashing and find the order of elements of each
hashing. Here Hash table size 12.
i) Separate chaining hash table 10
ii) Hash table using quadratic probing
iii)Hash table with second hash function

1
6. Let G be a graph whose vertices are the alphabets A through H and let the
adjacent vertices of each vertex be given by the table.

Vertex Adjacent vertices


A B, C,D,F
B A,C,D
C A,B,D
D A,B,C,F
E F,G,H 10
F E,F,H,D,A
G E,F,H
H E,F,G

i) Draw the graph G(V,E).


ii) Find the BFS starting with Vertex B.
iii) Find the DFS starting with vertex H.

You might also like