0% found this document useful (0 votes)
19 views1 page

ADSA

The document is an exam paper for an advanced data structures and algorithms course. It contains 8 questions covering topics like Python classes and lists, stacks and queues, hash tables, trees, graphs, object oriented concepts, and sorting algorithms.

Uploaded by

245123742004
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)
19 views1 page

ADSA

The document is an exam paper for an advanced data structures and algorithms course. It contains 8 questions covering topics like Python classes and lists, stacks and queues, hash tables, trees, graphs, object oriented concepts, and sorting algorithms.

Uploaded by

245123742004
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/ 1

Code No.: M11A92527 Date: 23.07.

2021

CVR COLLEGE OF ENGINEERING


UGC Autonomous Institution - Affiliated to JNTUH R18

M. Tech I Year I Sem. Main & Suppl. Exams July/Aug-2021 (2020, 2019 & 2018 Batches)
Subject: Advanced Data Structures and Algorithms
Branch: AI (CSE)
Time: 3 hours Max. Marks: 70
Answer Any Five Questions (5 X 14 = 70 Marks)
All Questions Carry Equal Marks

1. a) Explain Python’s built-in classes with examples.


b) Discuss how to use Python’s list comprehension syntax to produce the list
[1, 2, 4, 8, 16, 32, 64, 128, 256].

2. a) Give a recursive method for removing all the elements from a stack.
b) Explain any one application of Queue with an example.

3. a) Give a concrete implementation of the pop method in the context of the Mutable
Mapping class, relying only on the five primary abstract methods of that class.
b) Explain why a hash table is not suited to implement a sorted map

4. a) What is splay tree? Write the advantages of splay tree in representation of


dictionaries.
b) List the prefixes of the string P ="aaabbaaa" that are also suffixes of P.

5. a) Define Graph. Draw a simple undirected graph G that has 12 vertices, 18 edges,
and3 connected Components.
b) Compare and contrast BFS and DFS.

6. a) Describe a component from a text-editor GUI and the methods that it encapsulates.
b) Draw a class inheritance diagram for the following set of classes:
i) Class Goat extends object and adds an instance variable _tail and methods
milk( ) and jump( ).
ii) Class Pig extends object and adds an instance variable _nose and methods
eat(food) and wallow( ).

7. a) Write a Python program for a matrix class that can multiply two dimensional
arrays of numbers, assuming the dimensions agree appropriately for the operation
b) Describe the procedure to sort the nodes in a singly linked list.

8. a). Draw an example of a red-black tree that is not an AVL tree.


b) Explain Kruskal’s algorithm with an example.

*****

You might also like