21CS42 | Design and Analysis of Algorithm | Fourth Semester



Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-01

1.Sort a given set of n integer elements using Selection Sort method and compute its time complexity.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-02

2.Sort a given set of n integer elements using Quick Sort method and compute its time complexity.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-03

3.Sort a given set of n integer elements using Merge Sort method and compute its time complexity.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-04

4. To solve Knapsack problem using Greedy method.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-05

5. To Find shortest paths to other vertices from a given vertex in a weighted connected graph, using Dijkstra's algorithm.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-06

6. To find Minimum Cost Spanning Tree of a given connected undirected graph using Kruskal's algorithm. Use Union-Find algorithms in your program.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-07

7. To find Minimum Cost Spanning Tree of a given connected undirected graph using Prim's algorithm.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-08

8. Solve All-Pairs Shortest Paths problem using Floyd's algorithm.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-09

9. Solve Travelling Sales Person problem using Dynamic programming.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-10

10. Solve 0/1 Knapsack problem using Dynamic Programming method..

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-11

11. Design and implement C++/Java Program to find a subset of a given set S = {Sl, S2,…, Sn} of n positive integers whose SUM is equal to a given positive integer d. For example, if S = {1, 2, 5, 6,8} and d= 9, there are two solutions {1, 2, 6} and {1, 8}. Display a suitable message, if the given problem instance doesn't have a solution.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
Program-12

12. Design and implement C++/Java Program to find all Hamiltonian Cycles in a connected undirected Graph G of n Vertices using Backtracking Principle.

Open and Download


Design and Analysis of Algorithm Integrated Lab - 21CS42
All Programs


Useful Links






Eclipse IDE 2019-03 R


Eclipse IDE for Enterprise Java Developers




Java Executable File


1.8 Version Java Excutable File