Which data structure is commonly used to represent the order of visited vertices during a Depth-First Search?
Linked List
Queue
Heap
Stack
Which of the following graph traversal algorithms is generally more suitable for finding the shortest path in an unweighted graph?
Depth-First Search (DFS)
Both DFS and BFS are equally suitable.
Neither DFS nor BFS can find shortest paths in unweighted graphs.
Breadth-First Search (BFS)
Which of the following is an advantage of using an adjacency matrix representation for a graph?
Faster to find all neighbors of a vertex.
Less memory usage for large graphs.
Efficient for sparse graphs.
Constant time edge existence check.
Adding an edge between two vertices in an undirected graph always:
Increases the number of connected components.
Decreases the number of connected components.
Creates a cycle.
May increase or decrease the number of connected components.
What is the time complexity of performing a Breadth-First Search on a graph with 'V' vertices and 'E' edges?
O(E)
O(V)
O(V * E)
O(V + E)
In a connected graph, a path that visits every edge exactly once is known as:
Eulerian Path
Shortest Path
Hamiltonian Path
Critical Path
In the context of Breadth-First Search (BFS), what does it mean for a node to be at 'level i' from the starting node?
The node has 'i' neighbors in the graph.
The node is the i-th node discovered by the BFS algorithm.
The node has a priority value of 'i' in the BFS traversal order.
The node is at a distance of 'i' edges away from the starting node.
What is a cycle in a graph?
A vertex with a degree of 1.
The longest path between any two vertices.
A graph that is not connected.
A path that starts and ends at the same vertex.
Which of the following graph algorithms is best suited for finding the shortest path in a weighted graph?
Breadth-First Search
Dijkstra's Algorithm
Topological Sort
Depth-First Search
Which traversal algorithm is best suited for detecting cycles in a graph?
Prim's Algorithm
Breadth First Search (BFS)
Depth First Search (DFS)
Kruskal's Algorithm