Instead of setting, connected_node.update_count = 0 when we process the
neighbor, set curr_node.update_count = 0 like the original algorithm.