Skip to content

A structured guide to graph algorithms and dynamic programming techniques, with a focus on implementations in C

License

Notifications You must be signed in to change notification settings

arrhenius975/Algorithms_in_C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Algorithms_in_C

A structured guide to graph algorithms and dynamic programming techniques, with a focus on implementations in C

Comprehensive Guide to Algorithms in C

Overview

This repository provides a structured guide to graph algorithms and dynamic programming techniques, with a focus on implementations in C. Topics include:

Graph Algorithms

  • Bellman-Ford Algorithm: Single-source shortest path for graphs with negative weights.
  • Dijkstra's Algorithm: Single-source shortest path using a priority queue.
  • Prim's Algorithm: Minimum spanning tree using a greedy approach.
  • Kruskal's Algorithm: Minimum spanning tree using union-find.

Dynamic Programming

  • Huffman Coding: Optimal encoding for data compression.
  • Longest Common Subsequence (LCS): Finding the longest subsequence common to two strings.
  • Matrix Chain Multiplication: Minimizing scalar multiplications for matrix multiplication.
  • Activity Selection Problem: Selecting the maximum number of non-overlapping activities.

The PDF document contains theoretical insights, problem definitions, and well-documented C code implementations.


Repository Contents

  • Algorithms-1.pdf: A comprehensive guide to algorithms with C implementations.
  • C Source Files:
    • bellman_ford.c
    • dijkstra.c
    • prims.c
    • kruskal.c
    • huffman.c
    • lcs.c
    • matrix_chain.c
    • activity_selection.c

Usage

  1. Clone the repository:
    git clone https://github.com/arrhenius975/Algorithms_in_C.git
  2. Compile and run the programs: for example:
    gcc bellman_ford.c -o bellman_ford
    ./bellman_ford

Prerequisites

Basic knowledge of C programming.
GCC compiler or equivalent.

Author

GitHub: Zak @arrhenius975
Dedicated to: @r0s3-V3lv3t

References

Introduction to Algorithms by Cormen et al.
Algorithms by Robert Sedgewick and Kevin Wayne.

License

This project is licensed under the [MIT License](LICENSE).  
See the LICENSE file for details.

About

A structured guide to graph algorithms and dynamic programming techniques, with a focus on implementations in C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published