Source is S (left-most node):
| Next To Do | Certain | Pathlength | Pathpred |
| Of: A Is: 15
Of: B Is: 2 |
Of: A Is: S
Of: B Is: S | ||
| Of: A Is: 12
Of: D Is: 27 |
Of: A Is: B
Of: D Is: B | ||
| Of: D Is: 32 - keep 27
Of: E Is: 27 |
Of: D Is: same as above (B)
Of: E Is: A | ||
| Of: T Is: 42 | Of: T Is: D | ||
| Of: D Is: 37 - keep 27
Of: T Is: 52 - keep 42 |
Of: D Is: still B
Of: T Is: still D | ||
| no neighbors | Of: T Is: still D |
All vertices are Certain
Backtrack on Pathpred (path predecessor) to get path
Pathpred of T is D
Pathpred of D is B
Pathpred of B is S
Hence Single source shortest path from S to T is S to B to D to T and its length is 42