This post describes a solution to the single source shortest problem in graphs using the bellman ford algorithm
Read this post on irrays.blogspot.com