First attempted traversal algorithm.