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

CD3281 Set2

This document outlines 20 lab experiments for a data structures and algorithms course. The experiments cover topics like linked lists, binary search trees, priority queues, hashing, sorting algorithms, graph algorithms, and more.

Uploaded by

Nivi V
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)
367 views3 pages

CD3281 Set2

This document outlines 20 lab experiments for a data structures and algorithms course. The experiments cover topics like linked lists, binary search trees, priority queues, hashing, sorting algorithms, graph algorithms, and more.

Uploaded by

Nivi V
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

B.E / B.Tech.

PRACTICAL END SEMESTER EXAMINATIONS, NOVEMBER/DECEMBER 2022


Third Semester

CD3281 - DATA STRUCTURES AND ALGORITHMS LABORATORY

(Regulations 2021)

Time : 3 Hours Answer any one Question Max. Marks 100

Aim/Algorithm Program Experiment Viva-Voce Record Total


al Results
20 40 20 10 10 100

1. a. Write a Python code to implement LIFO structure. Use Linked List Implementation.

b. Write a Python code to implement to search an element in a list in a sequential order.

Write a Python code to implement the operations of binary search tree and perform the following

i. Create a BST with the elements 10,20,35,17,180,11, 21

2. ii. Insert a node with the element 6

iii. Delete the element 11 and 20

iv. Display the elements of the BST in preorder and postorder.

3. A person wants to visit several locations of the city. He starts from a vertex and then wants to
visit every place connected to this vertex and so on. What traversal methodology suits best for
him and implement it using Python?

4. a.) Code a Python program for the implementation of priority queue using the following heap
operations using Minheap.

i.) Insert ii.) Delete

b.) Write a Python program to sort the following numbers using Quick sort:

16, 23, 18, 11, 69, 15, 7, 14

Page 1 of 3
5. a. Write a Python program for evaluation of postfix expression

b. Write a Python program to sort the following using bubble sort.

6, 45, 16, 7, 24, 56, 98, 5, 19

6. a. Write a Python program to add the polynomial equations 4x^2+5x^1+6x^0 and


4x^2+3x^1+2x^0. For addition use List ADT.
b. Write a Python routine to find the mean of ‘n’ numbers and print all the numbers greater than
mean value.

7. Create a Python class for List ADT and create the routine for following operations: insert, delete,
count, reverse, search, find kth element. Use Linked List implementation.

8. Write a Python Program to create a binary tree and obtain the order of the nodes by applying
various tree traversal methods.

9. a. Write a Python to implement Dijikstra’s algorithm to solve the single source shortest path
problem.

b. Input an adjacency matrix of a graph and find the indegree and outdegree of each
node in the graph.

10. Implement any one open and closed hashing tables using Python.

11. a. Write a Python program to sort the elements using Merge sort.

b. Write a Python Program to convert the infix expression a+ (b*c-d)/e into postfix expression.

12. Code a Python program to implement List ADT by using array and linked list for the following
operations
i.) Create ii.) Traverse iii.) Find. iv.) Delete v) Reverse

13. Write a Python code to implement the hashing with hash table of size 10 using separate Chaining
for the following numbers 17,22,11,12,45,27,33,44

Page 2 of 3
14. Write a Python program to perform the following operations on binary search tree

i. Create a binary search tree

ii. Insert an element into the tree

iii. Delete an element from the tree

iv. Find the rightmost element from the tree

15. Write a Python program to find minimum spanning tree using Prim’s Algorithm

16. Write a Python program for implementing a Queue ADT using linked list.

17. a. Implement the priority queue using binary heap property. Use the two categories of binary
heap for implementation.

b. Write a Python program to search the element in a list by using the searching method in divide
and conquer Technique.

18. a. Write a Python code for searching a element in sequential order.

b. Write a Python program to implement double hashing.

19. a. Code a Python program for the implementation of priority queue using the following heap
operations using Maxheap i.) Insert ii.) Delete

b. Write a Python code to implement the hashing with hash table of size 10 using Separate
Chaining for the following numbers 17,12,41,61,75,2,5,8

20. a.) Implement the DFS to perform depth first search on the graph using Python.

b.) Code a Python program to implement the hashing with hash table of size 10 using open
addressing for the following numbers 6,3,63,18,4,5,12, 8, 33.

Page 3 of 3

You might also like