Skip to content

Contains the set of lab programs for Contains the set of lab programs for Analysis and Design of Algorithms, including various algorithm implementations and experiments for learning.

License

Notifications You must be signed in to change notification settings

Rajath2005/Analysis-and-Design-of-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Analysis and Design of Algorithms (ADA) Lab Programs

Typing SVG


🎯 About This Repository

This repository contains all 12 essential ADA lab programs required for VTU BCSL40A course. Each program is implemented in C programming language with proper documentation, sample outputs, and time complexity analysis.


📚 Lab Programs List

S.No Program Algorithm Type Complexity Status
1 Kruskal's Algorithm Greedy O(E log E)
2 Prim's Algorithm Greedy O(V²)
3a Floyd's Algorithm Dynamic Programming O(V³)
3b Warshall's Algorithm Dynamic Programming O(V³)
4 Dijkstra's Algorithm Greedy O(V²)
5 Topological Sorting Graph Traversal O(V + E)
6 0/1 Knapsack Problem Dynamic Programming O(nW)
7 Greedy Knapsack Greedy O(n log n)
8 Subset Sum Problem Backtracking O(2ⁿ)
9 Selection Sort Sorting O(n²)
10 Quick Sort Divide & Conquer O(n log n)
11 Merge Sort Divide & Conquer O(n log n)
12 N-Queens Problem Backtracking O(N!)

🎨 Sample Program Outputs

Click to view sample outputs

1. Kruskal's Algorithm - Minimum Cost Spanning Tree

Kruskal's Algorithm Output

2. Prim's Algorithm - Minimum Cost Spanning Tree

Prim's Algorithm Output

3a. Floyd's Algorithm - All-Pairs Shortest Paths

Floyd's Algorithm Output

3b. Warshall's Algorithm - Transitive Closure

Warshall's Algorithm Output

4. Dijkstra's Algorithm - Single Source Shortest Path

Dijkstra's Algorithm Output

5. Topological Sorting - Ordering of Vertices in DAG

Topological Sort Output

6. 0/1 Knapsack Problem - Using Dynamic Programming

0/1 Knapsack Output

7. Greedy Knapsack - Discrete & Continuous

Greedy Knapsack Output

8. Subset Sum Problem - Using Backtracking

Subset Sum Output

9. Selection Sort - With Time Complexity Analysis

Selection Sort Output Selection Sort Analysis

10. Quick Sort - With Time Complexity Analysis

Quick Sort Output

11. Merge Sort - With Time Complexity Analysis

Merge Sort Output

12. N-Queens Problem - Backtracking Solution

N-Queens Output

🛠️ How to Run

# Clone the repository
git clone https://github.com/yourusername/Analysis-and-Design-of-Algorithms.git
cd Analysis-and-Design-of-Algorithms/ADA\ Programs

# Compile any program
gcc program_name.c -o program_name

# Run the program
./program_name

🔗 Useful Links

⭐ Don't forget to star this repository if it helped you! ⭐

About

Contains the set of lab programs for Contains the set of lab programs for Analysis and Design of Algorithms, including various algorithm implementations and experiments for learning.

Topics

Resources

License

Stars

Watchers

Forks