EdwardJXLi / Graph-Algorithms

A repo containing some Graph Algorithms I wrote

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graph Algorithms

A collection of some graph algorithms I wrote during my free time
They all contain pretty in-depth comments, so feel free to use as reference
Some of these were homework for my ALGO2 Class

Algorithms:

  • Pathfinding Algorithms

    • Dijkstra’s algorithm (Done!)
      • Used to find smallest path from one node to any other node with non-negative weights on vertices. Some examples of its usage could be google maps to find shortest route.
    • Bellman-Ford’s algorithm (Done!)
      • Similar to Dijkstra, but it can handle negative weights. In return, it detect negative cycles.
  • All Pairs Shortest Path Algorithms

    • Floyd-Warshall’s algorithm (Done!)
      • Used to find shortest path from all nodes to all other nodes (All Pair Shortest Paths (APSP))
  • Advanced Minimum Spanning Tree Algorithms

    • Kruskal’s algorithm (Done!)
      • Used to find minimum spanning tree (MST). It calculates shortest route that passes through all nodes.
    • Prim’s algorithm (Done!)
      • Used to find minimum spanning tree (MST), similar to Kruskals. Major difference is Prim scans by nodes, while Kruskals scans by vertices.
  • Maximum Flow Algorithms

    • Ford-Fulkerson algorithm (TODO)
      • Description TODO
    • Dinic's algorithm (TODO)
      • Description TODO

About

A repo containing some Graph Algorithms I wrote

License:MIT License


Languages

Language:C 100.0%