0% found this document useful (0 votes)
11 views3 pages

DS Endsem 2023nov

The document outlines the examination paper for the III Semester B. Tech. in Data Structures, scheduled for November 2023, with a maximum score of 50. It includes various questions on graph algorithms, tree structures, sorting algorithms, expression trees, and linked lists, requiring students to demonstrate their understanding of data structures and algorithms. Each question specifies tasks such as constructing trees, applying sorting algorithms, and converting expressions, along with instructions for candidates.

Uploaded by

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

DS Endsem 2023nov

The document outlines the examination paper for the III Semester B. Tech. in Data Structures, scheduled for November 2023, with a maximum score of 50. It includes various questions on graph algorithms, tree structures, sorting algorithms, expression trees, and linked lists, requiring students to demonstrate their understanding of data structures and algorithms. Each question specifies tasks such as constructing trees, applying sorting algorithms, and converting expressions, along with instructions for candidates.

Uploaded by

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

Reg. No.

III SEMESTER B. Tech. (DSE)


END SEMESTER EXAMINATIONS
NOVEMBER 2023
SUBJECT: DATA STRUCTURES(DSE-2122)
(05 /12/2023)
Time: MAX. MARKS: 50

Instructions to Candidates:
 Answer ALL questions.
 Missing data may be suitably assumed.

1 Imagine a scenario where you are an urban planner tasked with optimizing the 5 CO4 BL4 PO1,2,3
construction of roads to connect several neighbourhoods in a growing city.
Each neighbourhood represents a vertex in a graph, and the roads between
them have different associated costs.
Let's consider a city with 7 neighborhoods (A, B, C, D, E, F, G) and their
associated road construction costs:

Table :-1
Source Destination Costs($)
A B 4
A C 7
A E 3
A F 6
B C 8
B D 9
C D 10
C E 5
D E 6
D F 11
E F 12
E G 5
F G 10

Your goal is to minimize the overall cost of constructing roads while ensuring
that all neighborhoods are interconnected.
i) Describe how you would apply the principles of a minimum
spanning tree using Kruskal’s algorithm to efficiently plan the road
network for the city.
ii) Find the cost of construction.
2 i) Construct the binary search tree and threaded tree for the given 3 CO3 BL3 PO1,2,3
data:
BRAINCOMPUTERINTERFACE
ii) How many null pointers are present in each representation?

3 Consider the scenario: Joe is having three descendants Alo, Rio, Sang. Rio 2 CO3 BL3 PO1,2,3
have two descendants Mark and Mary. Represent this data using tree data
structure. Convert this tree into binary tree. Show each step with neat diagram.

4 Consider the scenario wherein there is a need to process a large dataset of 5 CO4 BL4 PO1,2,3
student records for a university admission system. The dataset consists of
various student attributes such as Student ID and test scores. Sort this dataset
given below in Table 1 in descending order based on a specific attribute, say
the students' test scores, to streamline the admission process.
Table :-1
Student 101 102 103 104 105 106 107 108 109 110
ID
Test 85 72 91 68 77 94 80 63 88 75
score

i) Explain how you would use the heap sort algorithm to efficiently
sort the student records based on their test scores.
ii) Discuss the step-by-step process of heap sort and how it could be
applied to sort the student records. Write all intermediate steps in
detail with formula along with the intermediate tree and array
representation.

5 Construct a binary tree from the given preorder traversal as 3 CO2 BL3 PO1,2,3
CABDIHKMEFGJLNO and inorder traversal as AIDBKHMCFEJNLOG.
i) Draw the tree with all intermediate steps.
ii) Write its postorder traversal.

6 If the values of A, B, C, and D are 2, 3, 4, and 5 respectively, calculate the 2 CO2 BL3 PO1,2,3
value of the following prefix and postfix expressions:
i) +–*ABCD
ii) AB*C–D+

7 Construct a B tree (right biased) of order 4 by inserting the following keys :- 5 CO4 BL4 PO1,2,3
OBJECTRINDPGAMQ
i) From the constructed tree, delete the following keys: B, D, A, R, J
one by one. Explain which type of target node is deleted and
mention which method is applied to solve the underflow of b-tree.
Write all the intermediate steps and tree representations for
insertion and deletion operations clearly and neatly.
ii) What is meant by reflow state in b-tree?
8 Write the pseudocode for Merge sort and trace the algorithm for the input: 3 CO1 BL3 PO1,2,3
100,90,80,70,60,50.
9 Write a recursive user defined function to find Fibonacci series of the number 2 CO1 BL2 PO1,2,3
n.
10 Draw the Recursive Tree for the Towers of Hanoi problem where the number 5 CO2 BL3 PO1,2,3
of the disks is four. The function call is towers (4, N, M, L,) where 4 = no.of
disks, N=Source, M=destination, L=Auxiliary at the initial step. Mention all
the moves from the constructed tree and find total no.of moves.

11 i) Construct an expression tree for the given expression: A+(B- 3 CO2 BL3 PO1,2,3
C*(D/E)+F+G)*H^K-L.
ii) Write the preorder and postorder traversal of the constructed tree.
12 What are the two ways of deleting a node from a binary search tree which 2 CO1 BL2 PO1,2,3
contains left and right subtree?

13 i) Write the standard algorithm steps for converting infix to Polish 5 CO3 BL3 PO1,2,3
expression.
ii) Convert the given expression into Polish notation using standard
algorithm.
A+B-(L^M)*(P+O)-Q/S^R*T+Z
Write all the intermediate steps, show the stack content and resultant
expression at each step .
14 Write the algorithm for performing enqueue and dequeue operation on circular 3 CO2 BL2 PO1,2,3
queue by considering all necessary conditions.
15 Compare and contrast singly and doubly linked list. 2 CO2 BL1 PO1,2,3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy