Skip to content

Instantly share code, notes, and snippets.

View heiba's full-sized avatar

Mohamed Heiba heiba

View GitHub Profile
@heiba
heiba / HeibaDijkstra.java
Last active October 3, 2015 19:10
This is my implementation of Dijkstra's algorithm. Implementation works for single-directional vectors by default. For bi-directional vectors, the vector needs to be associated with both nodes. Feedback is welcome. Special thanks to Nathaniel Fan. https://www.youtube.com/watch?v=gdmfOwyQlcI
import java.util.ArrayList;
import java.util.Collections;
/**
* Created by Mohamed Heiba on 01/10/2015.
* <p>
* Implementation of Dijkstra's algorithm.
* <p>
* Implementation works for single-directional vectors by default.
* For bi-directional vectors, vectors needs to be associated to both nodes concerned.