Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views6 pages

Data Structure

Uploaded by

deanambrose8060
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

Data Structure

Uploaded by

deanambrose8060
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Roll No. …………………..

TCS–200

B. Tech. (CSE) (Third Semester)


EXAMINATION, 2024-25
DATA STRUCTURE

Time : Three Hours

Maximum Marks : 60
Note : Question paper has three Sections. Read
carefully instructions for each Section.

Section—A

(Very Short Answer Type Questions)

1. Attempt all questions. 1 each


(a) Illustrate the overflow and underflow
conditions in a circular queue. (CO2, UN)
(b) Write the various applications of stack and
linear queue. (CO2, RE)
(c) Write the complexity of Quicksort. (CO5, RE)
P. T. O.
[2] TCS–200

(d) What are the differences between linear


queues and a priority queue ? (CO2, UN)
(e) How do BFS and DFS differentiate from each
other ? Explain. (CO4, UN)
(f) The worst-case time required to search
(LINEAR SEARCH) a given element in a
sorted list of length n is .......... . (CO1, UN)
(g) Consider a linked list. What is the time taken
to insert an element after an element is
pointed by some pointer ? (CO3, AP)
(h) How does a complete binary tree differ from a
threaded binary tree ? (CO4, UN)
(i) Consider an array of 1000 elements. What is
the number of comparisons in pass number
334 when applied for bubble sort ? (CO1, AP)
(j) Write a code to generate a sparse matrix.

(CO1, UN)
(k) Differentiate between an array and a linked
list. (CO3, UN)
(l) Write the property that differentiates a tree
from a graph. (CO4, RE)
[3] TCS–200

Section—B

(Short Answer Type Questions)

2. Attempt all questions. 4 each


(a) A two-dimensional array defined as
A [14 : 17, – 11 : 31] requires 4 bytes of
storage space for each element. If the array is
stored in row-major form, then calculate the
address of the element at location A [16, 12].
Given that the base address is 200. (CO1, AP)

OR
Define the term complexity of an algorithm.
Explain the big-Oh notation. (CO1, UN)
(b) Given the in-order traversal of a binary tree as
E, A, C, K, F, H, D, B, G and the pre-order
traversal as F, A, E, K, C, D, H, G, B. Find
the post-order traversal of the binary tree.

(CO4, AP)
OR
Define the term B-tree. What are the various
properties of B-tree ? How does a B-tree
differ from an AVL tree ? (CO4, UN)

P. T. O.
[4] TCS–200

(c) Explain the different functions used in C for


dynamic memory. (CO3, UN)

OR
Write and explain the algorithm for the
insertion of a node after a given location in
the link list. (CO3, AP)
(d) Form an AVL tree with the following keys :

(CO4, AP)
164, 11, 114, 126, 113, 110, 98, 85
OR
Form a complete binary tree from the
following array and apply preorder
traversing : (CO4, AN)

66, 88, 60, 90, 44, 11, 66, 2


(e) Apply heap sort on the following array :

(CO5, AP)
188, 125, 115, 190, 130, 111, 177, 122, 145

OR
Use the division method to store the following
elements in Hashing : (CO5, AN)
12, 45, 67, 88, 27, 78, 20, 62, 36, 55
Assume m = 4.
[5] TCS–200

(f) Write and explain the merge sort algorithm


with an example. (CO5, AP)

OR
Apply the Huffman’s coding algorithm on the
following table : (CO5, AP)

Symbol Frequency

Z 6
X 24
Y 4
F 12
K 2
W 19
P 11
M 22

Section—C
(Long Answer Type Questions)
3. Attempt all questions. 8 each
(a) Consider the expression (2x + y) (5a – b)5 and
find the post-order. (CO2, AP)

OR
Write function/algorithm for the various
operations in DEQUEUE. (CO2, UN)
P. T. O.
[6] TCS–200

(b) Consider the given array 60, 30, 20, 70, 90,
55, 35, 95, 45, 80, 50, 40 and form the BST.
Delete the elements 55, 95 and 60
respectively. (CO4, AP)

OR
Form the B tree of degree 2 with the
following keys : (CO4, AP)
F, S, Q, K, C, L, H, T, V, W, M, R, N, P, A,
B, X, Y, D, Z, E
(c) Write an algorithm for bubble sort. What
number of swaps is required if bubble sort is
applied on 25, 20, 2, 5, 9, 10, 6 ? (CO5, UN)

OR
Generate the minimum cost-spanning tree
for the following graph using Kruskal’s
algorithm : (CO5, AN)

TCS–200 910

You might also like