Shortest Path Algorithms for Graphs of Restricted In-Degree and Out-Degree