implemented djikstras algorithm to find the smallest distanse of all nodes to the start node. will be used when calculating the layout of the flowchart.