@Mian Saeed Akbar
This is very useful, thanks. Will it always (in any graph) give the optimal/minimal weight of any path?