$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #286

What goes in the blank?

# store an undirected edge (u, v)
graph[u].append(v)
graph[____].append(u)

Answer: v (also accepted: v)

An undirected edge is recorded in both adjacency lists, so v must also point back to u.
Play Problem Solving ▸