Dsa Lab File Complete
Dsa Lab File Complete
S.
Title of Experiment Date Signature
No.
a) Stack ADT
b) Queue ADT
a) Stack ADT
b) Queue ADT
a) Insertion.
b) Deletion.
a) Prim’s algorithm.
b) Kruskal’s algorithm.
a) Pre-order.
b) In-order.
c) Post-order.
a) Quick sort.
b) Merge sort.
Lab Experiment 1
Objective:
Write programs to implement the following using an array.
a) Stack ADT
Code:
Output:
b) Queue ADT
Code:
Output:
Lab Experiment 2
Objective:
Write programs to implement the following using a singly linked list.
a) Stack ADT
Code:
Output:
b) Queue ADT
Code:
Output:
Lab Experiment 3
Objective:
Write a program to implement the deque (double-ended queue) ADT using a doubly linked list.
Code:
Output:
Lab Experiment 4
Objective:
Write a program to perform the following operations:
Code:
Output:
Lab Experiment 5
Objective:
Write a program to implement circular queue ADT using an array.
Code:
Output:
Lab Experiment 6
Objective:
Write a program to implement all the functions of a dictionary (ADT) using hashing.
Code:
Output:
Lab Experiment 7
Objective:
Write a program to perform the following operations on B-Trees and AVL-trees:
a) Insertion. b) Deletion.
B-trees
Code:
Output:
AVL-Trees
Code:
Output:
Lab Experiment 8
Objective:
Write programs for implementing BFS and DFS for a given graph.
Code:
Output:
Lab Experiment 9
Objective:
Write programs to implement the following to generate a minimum cost-spanning tree:
Output:
Code:
Output:
Lab Experiment 11
Objective:
Write a program that uses non-recursive functions to traverse a binary tree in:
Code:
Output:
Lab Experiment 12
Objective:
Write programs for sorting a given list of elements in ascending order using the following sorting
methods:
Output:
Output: