Added Bellman-Ford's algorithm, so that a graph with negative edge
weights can be used.