0
0
Data Structures Theoryknowledge~20 mins

Directed vs undirected graphs in Data Structures Theory - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Graph Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding edge direction in graphs

Which statement correctly describes the difference between a directed graph and an undirected graph?

ABoth directed and undirected graphs have edges with directions, but directed graphs allow multiple edges between the same vertices.
BIn a directed graph, edges connect vertices mutually without direction; in an undirected graph, edges have a direction from one vertex to another.
CIn a directed graph, edges have a direction from one vertex to another; in an undirected graph, edges do not have direction and connect vertices mutually.
DUndirected graphs have edges with weights, while directed graphs do not have weights on edges.
Attempts:
2 left
💡 Hint

Think about whether the connection between two points has a one-way or two-way relationship.

📋 Factual
intermediate
1:00remaining
Counting edges in undirected graphs

In an undirected graph with 5 vertices where every vertex is connected to every other vertex exactly once, how many edges are there?

A5
B10
C15
D20
Attempts:
2 left
💡 Hint

Use the formula for edges in a complete undirected graph: n(n-1)/2.

🔍 Analysis
advanced
1:30remaining
Edge count comparison between directed and undirected graphs

Consider a graph with 4 vertices where every possible edge exists. How many edges does the directed graph have compared to the undirected graph?

ADirected graph has 12 edges; undirected graph has 6 edges.
BDirected graph has 6 edges; undirected graph has 12 edges.
CBoth directed and undirected graphs have 12 edges.
DDirected graph has 8 edges; undirected graph has 4 edges.
Attempts:
2 left
💡 Hint

Remember that directed graphs count edges in both directions separately, while undirected graphs count each connection once.

Reasoning
advanced
1:30remaining
Identifying graph type from edge list

Given the edge list: (A → B), (B → A), (B → C), (C → B), (A → C), (C → A), which type of graph does this represent?

ADirected graph with edges only in one direction between vertices.
BUndirected graph represented as directed edges in one direction only.
CUndirected graph with missing edges.
DDirected graph with edges in both directions between vertices.
Attempts:
2 left
💡 Hint

Check if edges exist in both directions between pairs of vertices.

🚀 Application
expert
2:00remaining
Determining connectivity in directed vs undirected graphs

Which statement correctly explains connectivity differences between directed and undirected graphs?

AIn an undirected graph, if there is a path between two vertices, the path works both ways; in a directed graph, a path from vertex A to B does not guarantee a path from B to A.
BIn a directed graph, connectivity is always mutual between vertices; in an undirected graph, connectivity is one-way only.
CConnectivity in undirected graphs depends on edge weights, while in directed graphs it depends on edge directions only.
DBoth directed and undirected graphs always have mutual connectivity between any two connected vertices.
Attempts:
2 left
💡 Hint

Think about whether you can travel back and forth between two points in each graph type.