Skip to content

alok-devforge/design-and-analysis-of-algorithm

Repository files navigation

📊 Design and Analysis of Algorithms

Language Last Commit Course

This repository contains implementations of fundamental algorithms and data structures as part of the Design and Analysis of Algorithms course. All implementations are written in C language with a focus on efficiency, readability, and proper analysis.

📑 Table of Contents

🔍 Overview

This repository is organized into assignment folders, each containing implementations of specific algorithms. The focus is on understanding fundamental algorithm design paradigms and analyzing their efficiency.

📚 Assignment List

Assignment 01: Searching Algorithms

Assignment 02: Sorting Algorithms

  • Merge Sort: Divide and conquer sorting algorithm
  • Quick Sort: Efficient sorting method with partitioning

Assignment 03: Divide and Conquer

Assignment 04: Graph Traversal

Assignment 05: Shortest Path Algorithm

Assignment 06: Backtracking

Assignment 07: Dynamic Programming

Assignment 08: Greedy Algorithms

🚀 How to Run

  1. Clone the repository:

    git clone https://github.com/yourusername/DAA-ASSIGNMENTS.git
  2. Navigate to the desired algorithm folder:

    cd "DAA ASSIGNMENTS/ASSIGNMENT XX"
  3. Compile the C program:

    gcc XX_AlgorithmName.c -o algorithm
  4. Execute the program:

    ./algorithm

🧩 Implementation Details

Each implementation includes:

  • Proper documentation and comments
  • Input/output examples
  • Core algorithm implementation
  • Supporting utility functions

⏱️ Time and Space Complexity

Algorithm Time Complexity (Average) Time Complexity (Worst) Space Complexity
Linear Search O(n) O(n) O(1)
Binary Search O(log n) O(log n) O(1)
Merge Sort O(n log n) O(n log n) O(n)
Quick Sort O(n log n) O(n²) O(log n)
DFS O(V + E) O(V + E) O(V)
BFS O(V + E) O(V + E) O(V)
Dijkstra's Algorithm O(V² + E) O(V² + E) O(V + E)
N-Queen O(n!) O(n!) O(n)
Knapsack (DP) O(n×W) O(n×W) O(n×W)
Job Sequencing O(n²) O(n²) O(n)
Fractional Knapsack O(n log n) O(n log n) O(1)

🤝 Contributing

Contributions are welcome! If you'd like to improve implementations or add new algorithms:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/new-algorithm
  3. Commit your changes: git commit -m 'Add new algorithm'
  4. Push to the branch: git push origin feature/new-algorithm
  5. Submit a pull request

📚 Resources

Releases

No releases published

Packages

No packages published

Languages