Implemented Bellman-Ford algorithm for single-source shortest paths problem (tested manually).