Simple API for "Shortest Path" problem.