Correct graph search algorithm.