0% found this document useful (0 votes)
10 views

Data Structures & Algorithms

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)
10 views

Data Structures & Algorithms

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/ 2

QP Code: RM23BTECH023 Reg.

AY 23
No

GIET UNIVERSITY, GUNUPUR – 765022


B. Tech (Second Semester Regular) Examinations, May – 2024
23BBSES12003 – Data Structures & Algorithms
(Common to all Branches)
Time: 3 hrs Maximum: 60 Marks

(The figures in the right hand margin indicate marks)


PART – A (2 x 5 = 10 Marks)

Q.1. Answer ALL questions CO # Blooms


Level
a. A matrix R [10] [10] has elements given input. How to check whether the matrix is sparse or not? CO2 K2
b. List out the overflow and underflow conditions in an array of elements that follow the First In CO1 K1
First Out Concept.
c. A double linked list has 10 nodes, where the pointer PTR2 points to the 4th node and pointer CO3 K3
PTR3 points to the 6th node. Now write the piece of statements which allows you to insert a new
node pointed by PTR1.
d. Given a Binary Tree below: CO4 K2

Find the in-order, post-order sequence of nodes during traversal.


e. Define Terms: CO1 K3
(i) Weighted Graph (ii) Self-Loop

PART – B (10 x 5 = 50 Marks)

Answer ALL questions Marks CO # Blooms


Level

2. a. Define row major order and column major order. Given a matrix W [10] [10] 5 CO2 K3
with elements having a base address of 10000. If the size of each memory is
10 bytes, then find the address of W[5][5] in row major order and also in
column major order.
b. Given a stack implemented using an array, write down the algorithms for the 5 CO3 K3
operations performed on it, such as:
(i) Push (ii) pop
(OR)
c. Given an infix expression X= Q+W/E-R*T+Y-U 5 CO4 K2
Find its equivalent postfix expression using Stack.
d. Briefly elaborate the evaluation process of given postfix expression P = 2, 3, 5 CO3 K3
15, 10, 2, /, -, *, +, 4, + using Stack
3.a. Given a list of elements: 70, 40, 50, 30, 35, 25, 45. Write down the algorithm 5 CO4 K3
for applying insertion sort to the elements to sort them in ascending order.
b. Write down the algorithm for implementing binary search on a sorted list of 5 CO3 K3
elements present in an array.
(OR)
c. Write down the algorithms for implementing queue concepts on a single 5 CO4 K2
linked list and perform the operations:
(i) insertion of a node at the rear-end (ii) deletion of a node from the front-end

Page 1 of 2
d. Write down the algorithm from implementing the deletion of a node from the 5 CO3 K3
end of a double linked list.
4.a. Construct a binary tree using the traversal sequence of nodes given below: 5 CO2 K3
In-order sequence: F D B E I G J A C H
Pre-order sequence: F D I J G E B H C A
Write down the three recursive traversal algorithms to traverse all the nodes of
a binary tree.
b. Given a sequence of numbers: 40, 30, 50, 80, 90, 20, 10, 60, 70, 100 5 CO3 K3
Construct a Binary Search Tree and then write down the algorithm for
applying searching operations to it.
(OR)
c. Write down the non-recursive in-order traversal method for traversing all the 5 CO4 K2
nodes of a binary tree.
d. Briefly explain the sequential representation and linked representation of the 5 CO1 K3
given binary tree below.

5.a. Construct an AVL Tree on the given a sequence of elements: 5 CO5 K3


90, 80, 70, 60, 50, 10, 20, 30, 40, 55
b. Construct a Max-Heap Tree on the given sequence of elements: 5 CO3 K3
71, 61, 91, 31, 41, 61, 81, 51
(OR)
c. Given a graph below: 5 CO2 K3
Represent the graph using an adjacency matrix and an incidence matrix.

d. Write down the algorithm to traverse all the nodes of a graph using a queue. 5 CO2 K3

6.a. Given a list of 6 elements: 30, 32, 45, 65, 57, 99 5 CO4 K3
Explain the three different hash functions and find the hash addresses using all
the hash functions.
b. Write down the algorithm for applying bubble sort to a list of numbers given 5 CO5 K2
input in an array.
(OR)
c. Write down the algorithm for evaluating postfix expression using stack. 5 CO4 K3

d. Write down the algorithms to perform the operations on a double linked list: 5 CO6 K2
(i) count the total no. of nodes (ii) find the sum of all the node values.

--- End of Paper ---

Page 2 of 2

You might also like