Tableau Software interview question

Graph traversal problem