SAP interview question

In Djikstra' algorithm ,situation was modified and asked to make new algorithm .