JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
ADVANCED DATA STRUCTURES USING PYTHON LAB
M.Tech I Year I Semester (R22)
Pre-Requisites
UG level course in Data Structures
Course Objectives
This course will enable students to
1. Implement Object Oriented Programming concepts in Python.
2. Understand Lists, Dictionaries and Regular expressions in Python.
3. Understanding how searching and sorting is performed in Python.
4. Understanding how linear and non-linear data structures works.
5. To learn the fundamentals of writing Python scripts.
Course Outcomes
The students should be able to:
1. Examine Python syntax and semantics and apply Python flow control and functions.
2. Create, run and manipulate Python Programs using core data structures like Lists,
3. Apply Dictionaries and use Regular Expressions.
4. Interpret the concepts of Object-Oriented Programming as used in Python.
5. Master object-oriented programming to create an entire python project using objects and classes
List of Experiments:
1. Write a Python program for class, Flower, that has three instance variables of type str, int, and float, that respectively represent the name of the flower, its number of petals, and its price. Your class must include a constructor method that initializes each variable to an appropriate value, and your class should include methods for setting the value of each type, and retrieving the value of each type.
2. Develop an inheritance hierarchy based upon a Polygon class that has abstract methods area( ) and perimeter( ). Implement classes Triangle, Quadrilateral, Pentagon, that extend this base class, with the obvious meanings for the area( ) and perimeter( ) methods. Write a simple program that allows users to create polygons of the various types and input their geometric dimensions, and the program then outputs their area and perimeter.
3. Write a python program to implement Method Overloading and Method Overriding.
4. Write a Python program to illustrate the following comprehensions:
a) List Comprehensions b) Dictionary Comprehensions c) Set Comprehensions d) Generator Comprehensions
5. Write a Python program to generate the combinations of n distinct objects taken from the elements of a given list. Example: Original list: [1, 2, 3, 4, 5, 6, 7, 8, 9] Combinations of 2 distinct objects: [1, 2] [1, 3] [1, 4] [1, 5] .... [7, 8] [7, 9] [8, 9].
6. Write a python program for Linear Search and Binary search
7. Write a python program to implement Bubble Sort and Selection Sort.
8. Write a python program to implement Merge sort and Quicksort.
9. Write a python program to implement Stacks and Queues.
10. Write a python program to implement a Singly Linked List.
11. Write a python program to implement a Doubly Linked list.
12. Write a python program to implement Binary Search Tree.
TEXT BOOKS:
1. Data structures and algorithms in python by Michael T. Goodrich
2. Data Structures and Algorithmic Thinking with Python by Narasimha Karumanchi
REFERENCE BOOKS:
1. Hands-On Data Structures and Algorithms with Python: Write complex and powerful code using the latest features of Python 3.7, 2nd Edition by Dr. Basant Agarwal, Benjamin Baka.
2. Data Structures and Algorithms with Python by Kent D. Lee and Steve Hubbard.
3. Problem Solving with Algorithms and Data Structures Using Python by Bradley N Miller and David L. Ranum.