A curated collection of lab programs across 4 subjects. {DA, OS, C++, Graph}
📌 This repository is intended for Mysore University School of Engineering students for their IV Semester Lab. All programs here are not exactly as in the manual — they have been corrected and improved so that the output is accurate to the question/aim.
IV-semester-lab-programs/
├── OS/ # Operating Systems (C & Python)
│ ├── C/
│ └── Python/
├── Cpp/ # C++ Programs
├── DAA/ # Design and Analysis of Algorithms (C)
└── Graph Algorithms/ # Graph Algorithms (Python)
| Folder | Subject | Language |
|---|---|---|
OS/ |
Operating Systems | C & Python |
Cpp/ |
C++ (OOP / STL) | C++ |
DAA/ |
Design and Analysis of Algorithms | C |
Graph Algorithms/ |
Graph Algorithms | Python |
| # | File | Topic |
|---|---|---|
| 1 | 01_FCFS.c | FCFS CPU Scheduling |
| 2 | 02_SJF.c | SJF CPU Scheduling |
| 3 | 03_Priority_Scheduling.c | Priority CPU Scheduling |
| 4 | 04_Producer_Consumer.c | Producer-Consumer Problem (Semaphores) |
| 5 | 05_MFT.c | Memory Management — Fixed Partitions (MFT) |
| 6 | 06_MVT.c | Memory Management — Variable Partitions (MVT) |
| 7 | 07_First_Fit.c | Memory Allocation — First Fit |
| 8 | 08_Best_Fit.c | Memory Allocation — Best Fit |
| 9 | 09_Worst_Fit.c | Memory Allocation — Worst Fit |
| # | File | Topic |
|---|---|---|
| 1 | 01_swap_references.cpp | Swap Using Reference Variables |
| 2 | 02_complex_addition.cpp | Complex Number Addition (Friend Function) |
| 3 | 03_employee_class.cpp | Employee Class |
| 4 | 04_student_class.cpp | Student Names, Roll No & Grades |
| 5 | 05_string_operator_overload.cpp | String Operator Overloading (== and +) |
| 6 | 06_matrix_operator_overload.cpp | Matrix Addition (Operator Overloading) |
| # | File | Topic | Category | Complexity |
|---|---|---|---|---|
| 1 | 01_Binary_Search.c | Binary Search | Searching | O(log n) |
| 2 | 02_Merge_Sort.c | Merge Sort | Divide & Conquer | O(n log n) |
| 3 | 03_Quick_Sort.c | Quick Sort | Divide & Conquer | O(n log n) avg |
| 4 | 04_Strassen_Matrix_Multiply.c | Strassen's Matrix Multiplication | Divide & Conquer | O(n^2.807) |
| 5 | 05_Topological_Sort.c | Topological Sort (Kahn's) | Graph | O(V+E) |
| 6 | 06_Coin_Change_Greedy.c | Coin Change (Greedy) | Greedy | O(n) |
| 7 | 07_Fractional_Knapsack.c | Fractional Knapsack | Greedy | O(n log n) |
| 8 | 08_Job_Sequencing.c | Job Sequencing with Deadlines | Greedy | O(n²) |
| 9 | 09_Prims_MST.c | Prim's MST | Greedy / Graph | O(V²) |
| 10 | 10_Dijkstra.c | Dijkstra's Shortest Path | Greedy / Graph | O(V²) |
| 11 | 11_Huffman_Coding.c | Huffman Coding | Greedy | O(n log n) |
| 12 | 12_Knapsack_DP.c | 0/1 Knapsack | Dynamic Programming | O(nW) |
| 13 | 13_Floyd_Warshall.c | Floyd-Warshall All-Pairs SP | Dynamic Programming | O(V³) |
| 14 | 14_N_Queens.c | N-Queens Problem | Backtracking | O(N!) |
| 15 | 15_TSP_Branch_Bound.c | Travelling Salesman Problem | Branch & Bound | Exponential |
| # | File | Topic | Type |
|---|---|---|---|
| 1 | 01_Topological_Sort.py | Topological Sort | DFS |
| 2 | 02_Warshall_Algorithm.py | Transitive Closure (Warshall's) | Dynamic Programming |
| 3 | 03_BFS.py | Breadth First Search | BFS |
| 4 | 04_DFS_Connectivity.py | Graph Connectivity Check | DFS |
| 5 | 05_Dijkstra.py | Dijkstra's Shortest Path | Greedy + Heap |
| 6 | 06_Kruskal_MST.py | Kruskal's MST | Greedy + Union-Find |
Programs are written for academic/learning purposes.