Template:Graph search algorithm