Everpure interview question

How did you optimize the bellmen-ford algorithm when you implemented it for getting the shortest path?