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

Code No.: M11A92528 Date: 02.05.

2022

CVR COLLEGE OF ENGINEERING


UGC Autonomous Institution - Affiliated to JNTUH R18

M. Tech I Year I Sem. Main & Suppl. Exams May- 2022 (2021, 2020, 2019 &2018 Batches)
Subject: Advanced Data Structures and Algorithms
Branch: Artificial Intelligence (CSE)
Time: 3 hours Max. Marks: 70
Note:
1. Please verify the regulation of question paper and subject name
2. Assume required data, if not given in the question.

Answer Any Five Questions (5 X 14 = 70 Marks)


All Questions Carry Equal Marks

1. a) Illustrate Expressions, Operators, and Precedence in Python. BL2 (CO1)


b) Construct a Python function that takes a positive integer n and returns the sum of
the squares of all the positive integers smaller than n. BL3 [7+7]

2. a) Show how to use a stack S and a queue Q to generate all possible subsets of an
n- Element set T no recursively. BL1 (CO2)
b) Construct a non- recursive algorithm for post order traversal of a tree. BL3 [7+7]

3. a) Analyze the implementation of the items( ) method directly within the Unsorted
Table Map class, ensuring that the entire iteration runs in O(n) time. BL4 (CO3)
b) Explain map ADT and its methods with examples in python. BL2 [7+7]

4. a) What does a splay tree look like if its entries are accessed in increasing order by
their keys? BL1 (CO4)
b) Develop a python program for implementing Boyer Moore algorithm and trace
your algorithm for the text abacabacabdad and the pattern cabd. BL5 [7+7]

5. a) Analyze Brute- force algorithm with an example. BL4 (CO5)


b) Explain KMP algorithm and its implementation using python. BL6 [7+7]

6. a) What are the goals and principles of Object-Oriented Design? BL1 (CO1)
b) Construct a Python function that takes two three-dimensional numeric data sets
and adds them component wise. BL3 (CO3)
[7+7]
7. a) Construct a formal proof that any sequence of N append or pop operations on an
initially empty dynamic array takes O(n) time. BL3 (CO2)
b) What is binary tree? What for it is used? Mention its properties. BL3 [7+7]

8. a) Construct a Python class that can take any red-black tree and convert it into its
corresponding (2,4) tree and can take any (2,4) tree and convert it into its
corresponding red-black tree. BL2 (CO4)
b) Develop Djikstra’s algorithm using dynamic programming. BL3 (CO5)
[7+7]

*****

You might also like