0% found this document useful (0 votes)
9 views12 pages

Practical List DSA

This document is a lab manual for the BCA program at MIT College of Management, detailing practical assignments for Data Structures using algorithms. It includes tasks related to sorting and searching algorithms, linked lists, trees, stacks, queues, and graphs, with specific programming requirements in Python and C. Each assignment outlines the expected operations and implementations for various data structures and algorithms.

Uploaded by

golumax6208
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)
9 views12 pages

Practical List DSA

This document is a lab manual for the BCA program at MIT College of Management, detailing practical assignments for Data Structures using algorithms. It includes tasks related to sorting and searching algorithms, linked lists, trees, stacks, queues, and graphs, with specific programming requirements in Python and C. Each assignment outlines the expected operations and implementations for various data structures and algorithms.

Uploaded by

golumax6208
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/ 12

MIT ART DESIGN & TECHNOLOGY UNIVERSITY

MIT College of Management (MITCOM), Pune

PROGRAMME: BCA
COURSE – BCA - SEM II

Second Year Semester II

Data Structure using algorithms

LAB MANUAL/WORKBOOK

Created by – Prof.Jayashri Murhekar

……………………………………………………………………
MIT College of Management (MITCOM), Loni
Name - ………………………………………………………………
Course - ……………….. Year …………...... Sem ……….……..
PRN No -…………………….. Academic Year ……..………..

1
PRACTICAL LIST - Data Structure using algorithms

Sr. Name of Practical Sign Marks/ Page Date


No Grade

Assignment 1: Implementation of Sorting


Algorithms

1) Write a Python program to Sort an array


of n integers (accept the value of n from user)
in ascending order by using bubble.

2)Read the data from the file “employee.txt”


and sort on names in alphabetical order (use
strcmp) using bubble sort

3) Write a Python program to Sort an array


of n integers (accept the value of n from user)
by using Insertion sort.

4) Read the data from the file ”student.txt”


and sort on names in alphabetical order (use
strcmp) using insertion sort

5) Write a Python program to Sort an array


of n integers (accept the value of n from user)
by using Merge sort.

6)Write a Python program to Sort an array of n integers (accept the


value of n from user) in ascending order by using Quick sort .

7)Write a Python program to Sort an array of n integers (accept the


value of n from user) in ascending order by using heap sort technique.

Assignment 2: Implementation of Searching Algorithms

1) Write a Python program to Create an array of n integers. Accept a


value x from user and use linear search algorithm to check whether the
number is present in the array or not and output the position if the
number is present.

2)Write a Python program to Create an array of n integers. Sort the


array using bubble sort. Accept a value x from user and use binary
2
search algorithm to check whether the number is present in array or
not and output the position if the number is present.
3.Read the data from file 'cities.txt' containing names of 100 cities and
their STD codes. Accept a name of the city from user and use linear
search algorithm to check whether the name is present in the file and
output the STD code, otherwise output “city not in the list”
Assignment 3: Implementation of Singly Linked List

1) Dynamic implementation of Singly Linked List to perform


following operations: Create, Insert, Delete, Display,

2) Write a menu driven program to call the operations Search, Reverse

3.Create a static list in the sorted order.


Implement a list for a singly linked list with the create, insert
and Display operations. Write a menu driven driver program to
call the operations.

Assignment 4: Doubly Linked List

1)Create a Dynamic implementation of Doubly Linked List to perform


following
operations: Create, Insert, Delete, Display, Search

2.Implement a list for a doubly linked list with the, insert and
Display operations. Write a menu driven driver python
program to call all the operations.

Assignment 5: Circular singly & Doubly Linked List

1.Create a Dynamic implementation of Doubly Circular


Linked List to perform following
operations: Create, Insert, Delete, Display, Search

2.create a Dynamic implementation of Singly Circular Linked List to


perform following operations: Create, Insert, Delete, Display,

Assignment 6: Linked List Applications

1 Merge two sorted lists.


2 Addition of two polynomials in a single variable.
3 Multiplication of two polynomials in a single
variable.
3
Assignment 7: Tree
1.Write a menu driven python program to implement Binary search tree.
to perform the following operations: Create, Insert, Delete, Display,
Search
2.Write a python program to Count(T) the number of leaf nodes in the
tree

Assignment 8: Stack

1.Static and Dynamic implementation of Stack to


perform following operations: Init, Push, Pop, Peek,
Isempty, Isfull
Assignment 9: Applications of Stack

1.Implementation of an algorithm that reverses string of


characters using stack and checks whether a string is a
palindrome.
2.Infix to Postfix conversion.
3.Evaluation of postfix expression.

Assignment 10: Queue

Linear Queue
1.Static and Dynamic implementation of linear Queue
to perform following operations: Init, enqueue,
dequeue Peek, IsEmpty, IsFull.

Circular and Priority Queue


1.Implementation of circular queue
2.Implementation of priority queue Write a Python

Assignment 11: Graph

1)Write a python program that accepts the graph as an


adjacency matrix and converts it to adjacency
list representation. Write a function to display
the graph in adjacency list form and also perform
BFS and DFS traversal

4
2)Write a python program that accepts the vertices and
edges for a graph and stores it as an adjacency matrix.
Implement functions to print in degree, out degree, and
to display the adjacency matrix and also perform BFS
and DFS traversal

3)Write a C program that accepts the graph as an


adjacency matrix and converts it to adjacency list
representation. Write a function to display the graph in
adjacency list form.

4) Write a C program that accepts the graph as an


adjacency matrix and checks if the graph is undirected.
The matrix for undirected graph is symmetric

5
1.

6
7
8
9
10
11
12

You might also like