The least deviant path was defined by Klostermeyer as the path between two vertices and that minimizes the difference between the largest and smallest weights on the path. This paper presents an time algorithm for this problem in undirected graphs, improving upon the previously given time algorithm.
The same algorithm can also be used to solve the problem in time in directed graphs.