Quiz
Untitled
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (21)
1A breadth first traversal of a tree or a graph is commonly implemented with a(n):
- ABinary Search Tree
- BQueue
- CHeap
- DStack
2If both the left and right subtrees of a binary tree T meet the definition of an AVL tree, then T must also meet the definition of an AVL tree.
- ATrue
- BFalse
3All the leaves of a B-tree are at the same level.
- ATrue
- BFalse
4Suppose that a non-leaf node in a B-tree has 41 entries (keys). How many children will this node have?
- A82
- B40
- C2
- D41
- E42
5The balance value of an AVL node is calculated by finding the MAX height of the two children and adding 1.
- ATrue
- BFalse
6Every subtree of a "Binary Search Tree" is also a "Binary Search Tree".
- ATrue
- BFalse
7In an AVL tree, when the height of both children of a node are the same, this indicated that the balance factor of this node is:
- A-1
- B0
- C1
- D2
8AVL trees are efficient because they provide O(n) access/search time and insert time.
- ATrue
- BFalse
9Suppose that X is a B-tree leaf containing 41 entries (keys) and having at least one sibling. Which statement is true?
- AX has at least 41 siblings.
- BAny sibling of X is also a leaf.
- CThe parent of X has exactly 42 entries.
- DAny sibling of X contains at least 41 entries.
10If the depth of x is greater than the depth of y in a tree, then x is a descendant of y.
- ATrue
- BFalse
11In a B-tree of order 8, the root node must have at least 4 subtrees.
- ATrue
- BFalse
12Which of the trees from FIGURE 1 is not an AVL tree?
- AFigure 1.A
- BFigure 1.B
- CFigure 1.C
- DFigure 1.D
13Which statement is true for a B-tree?
- AAll nodes contain the exact same number of keys/entries.
- BAll non-leaf nodes have the exact same number of children.
- CAll leaves are at the exact same depth.
- DAll keys/entries of a node are greater than or equal to the keys/entries in the node's children.
14Binary Search trees are efficient because they guarantee O(log(n)) access time.
- ATrue
- BFalse
15Suppose that a B-tree has MAXIMUM branching of 11 and that a node already contains the keys/values 1 through 10. If a new value, 11, is added to this node, the node will split into two nodes. What values will be in these two nodes?
- AThe first node will have 1 through 5 and the second node will have 7 through 11.
- BThe first node will have 1 through 10 and the second node will have only 11.
- CThe first node will have 1 through 5 and the second node will have 6 through 11.
- DThe first node will have 1 through 6 and the second node will have 7 through 11.
- EThe first node will have only 1 and the second node will have the rest of the numbers.
16The depth of a node in a tree is equal to the number of its ancestors.
- ATrue
- BFalse
17Every subtree of an AVL tree is another AVL tree.
- ATrue
- BFalse
18The O( ) complexity for insert into a binary search tree is (select the best answer):
- AO(N) - linear time
- BO(log N) - logarithmic time
- CO(N log N) - linearithmetic time
- DO(1) - constant time
19In a height balanced binary serach tree (AVL), when do you make an adjustment in the tree?
- AWhen the height difference between two sides of a node is greater than or equal to one.
- BWhen the height difference between two sides of a node is greater than or equal to two.
- CWhen the height difference between two sides of a node is greater than or equal to zero.
- DWhen the balance value of a node is equal to -1.
20How would an AVL TREE look after key 19 is inserted into FIGURE 2?
- AFigure 2.A
- BFigure 2.B
- CFigure 2.C
- DFigure 2.D
21The O( ) complexity for insert into an AVL (balanced) binary search tree is (select the best answer):
- AO(N) - linear time
- BO(N log N) - linearithmetic time
- CO(log N) - logarithmic time
- DO(1) - constant time
Information
- Description
- (Computer Science) Quiz on Untitled, created by Amanda Hatch on 05/03/2014.
- Author
- Amanda Hatch
- Language
- English
- Views
- 14
- Tags
- Rating
- No ratings yet Rate this quiz