Graphs - Study Mode

[#126] What is the space complexity of storing a graph using an adjacency matrix?
Correct Answer

(D) O(V 2 )

[#127] What is the time complexity of adding an edge in an adjacency list representation of a graph?
Correct Answer

(C) O(1)

[#128] In a weighted graph, what does the edge weight represent?
Correct Answer

(B) The cost or distance between two vertices.

[#129] Which algorithm is used to find the strongly connected components of a directed graph?
Correct Answer

(C) Kosaraju's Algorithm

[#130] What is the time complexity of performing a BFS on a graph with V vertices and E edges using an adjacency list?
Correct Answer

(D) O(V + E)