Quiz
2. Red Black Tree
Erstelle ein kostenloses Konto, um dieses Quiz zu beenden
Speichere deinen Fortschritt und sieh dir dein Endergebnis an.
oder mit deiner E-Mail registrieren
Schon ein Konto? Anmelden
Fragen in diesem Quiz (19)
1
What color must the leaves be in a red-black tree?- ABlack
- BRed
2The number of black nodes from the root to a node is the node's
____ ______; the uniform number of black nodes in all paths from
root to the leaves is called the ____ _____ of the red–black tree.- AA) red height, red depth
- BB) red depth, red height
- CC) black depth, black height
- DD) black height, black depth
3What makes a tree a red-black tree?
- AAn extra bit on each node which determines the color to help balance it.
- Bnone of the above
4If a node is red, what color are its children?
- AA) Red
- BB) Black
- CC) Blue
- DD) Red node has to be leaf
5What are the Red and black colors used for?
- AA.to make it easier to read
- BB.they serve no purpose
- CC.they show the nodes with no children
- DD.They are part of the balancing of the tree
6What time does A red-black tree gurantee for searching?
- AO(log n) time
- Bnone of the above
7In a Red-Black Tree, the root of tree is always black.
- ARichtig
- BFalsch
8In a red black tree, every node is either red or black?
- ARichtig
- BFalsch
9In a Red-Black Tree, if a node is red, its child must be _________.
- ABlack
- BRed
10What is the searching time of a red-black tree?
- AA) O(n log n)
- BB) O(log n)
- CC) O(n^2)
- DD) O(n)
11What is the Average case of this tree's properties?
- Aa. Only space is O(log n)
- Bb. Only space is (log n)
- Cc. All but space is O(log n)
- Dd. None of the above
12In order to insert a red node into a red-black tree, the parent of the inserted node must be:
- AA. Red
- BB. Black
- CC. Green
- DD. Blue
13What is a red-black tree?
- AA) A tree with a dark red color
- BB) A tree requiring to be balanced every time a node is added
- CC) A self-balancing binary search tree
- DD) None of the above
14Which of the following is NOT correct when inserting a new node into a red-black tree?
- AA. if the new node is not the root, then it starts as red
- BB. if the new node is the root, then it starts as red
- CC. if the new node's parent is black, the insertion step is done
- DD. if the new node's parent is red and the new node's uncle is black, a rotation will be done before recoloring
15A red-black tree is a binary search tree that has which of the following red-black properties?
- AA. Every node is either red or black, and every leaf (NULL) is black.
- BB. If a node is red, then both its children are black.
- CC. Every simple path from a node to a descendant leaf contains the same number of black nodes.
- DD. All of the above
16When dealing with a red black tree, it is ok to have a red root.
- ARichtig
- BFalsch
17A red–black tree is a kind of self-balancing binary search tree. Each node of the binary tree has an extra bit, and that bit is often interpreted as the color (red or black) of the node.
Which is not correct the following statements about the properties of red black tree?- Aa. All leaves (NIL) are black. A node is either red or black.
- Bb. The root is black. This rule is sometimes omitted. Since the root can always be changed from red to black, but not necessarily vice versa, this rule has little effect on analysis.
- Cc. If a node is red, then both its children are black.
- Dd. All leaves (NIL) are not black.
18which one is not right about the red_black tree?
- AA. A red_black tree is a binary search tree.
- BB. In the average case, the time complexity of searching one member of the red_black tree is O(logn).
- CC. In the average case, the time complexity of inserting one member into the red_black tree is O(logn).
- DD. An AVL tree is better than a red_black tree with same data memebers in searching, insert and so on.
19At most, what is the max height of a red black tree?
- AA) 2Log(N)
- BB) Log(N!)
- CC) 2Log(N+1)
- DD) 2e^(N+1)
Informationen
- Beschreibung
- Algorithms and Data Structures | Test 3 Review | CSCI-3110-002 MTSU
- Autor
- Mena Sargios
- Sprache
- English
- Aufrufe
- 3.244
- Schlagwörter
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz