Confusion in teams sequence question

#1

Pg 275-276 EPI python; Graphs bootcamp first question
I didn’t understand the conditional:

elif curr in visited or curr not in graph:

  1. It doesn’t say that each team in the sequence should beat all the next teams in the sequence. It says just the next team so why curr in visited. As we already only tranverse edges from the current team, in which the current team has beaten the next one.

  2. I also don’t get curr not in graph. Since graph is constant, and we only go to nodes which have edge from the curr node.

0 Likes