Graph Theory37 sections · 1633 units
Open in Course

Quiz: Graph Representations in Code

Knowledge check

Check Your Understanding

You build an adjacency list for an undirected graph with VV vertices using vector<vector<int>> adj(V). When you add edge (u,v)(u, v), you push vv into adj[u] and uu into adj[v]. What is the total size across all inner vectors after adding EE edges?

  1. A.EE
  2. B.2E2E
  3. C.V+EV + E
  4. D.V×EV \times E
Start the roadmap to answer the quizzes and solve the challenges