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
Which of the following tree is used for external search?
B-Tree
A rotation is needed in an AVL Tree when the balance factor of a node becomes -3 or +3 after insertion
False
One simple rotation is sufficient to keep AVL Tree balanced after each insertion or deletion
False
ASCII is a variable-length coding scheme.
False
AVL Tree is a balanced binary search tree.
True
The worst case search time in AVL Tree is O(log2n)
True
The worst case computing time of merge sort is O(n*logn).
True
Radix sort operates in O(n+w) time, where w is the number of digits.
False
Quick sort requires more space than Radix sort.
False