final exam_DIS Flashcards
In the graph given below, which of the following nodes will be visited last if you apply breadth-first search starting from A?
H
An algorithm to traverse a directed graph must mark vertices when they have been visited.
True
Shortest path problem can be solved with an easy modification of the depth-first search algorithm
False
Depth-first search can use a queue for tracking visited nodes.
False
Breadth-first search can use a queue for tracking visited nodes
True
Adjacency matrix representation causes redundancy in undirected graphs since the matrix is always symmetric.
True
Depth-first search starts from the root of the graph.
False
Traveling salesman problem is an NP-complete problem.
True
Red-Black Tree does not need rotations since recoloring always keeps the tree balanced
False
If your application involves frequent insertions and deletions, then Red-Black tree should be preferred to AVL tree.
True
Each node stores at most 4 data values in a 2-3-4 Tree
False
The root of the tree is always red in a red-black tree.
False
In a directed graph, there may not be a path from one node to another.
True
There must be a root node in a directed graph which does not have an incoming arc
False
All the leaves are on the same level in a 2-3-4 Tree
True