Week 6 : Binary Trees – Quiz
1. (TCO 7) In the following binary tree, 22 is the _____ of 17.
(Points : 3)
left child
right child
sibling
parent
2. (TCO 7) In the following binary tree, the height of the node with value 39 is _____.
(Points : 3)
1
2
3
4
3. (TCO 7) In a binary search tree, the _____ is stored in the rightmost node of the tree. (Points : 3)
smallest value
greatest value
median
mean
4. (TCO 7) In a binary search tree, the key in the _____ node is larger than or equal to a key in the left subtree and smaller than a key in the right subtree. (Points : 3)
right
bottom
root
header
5. (TCO 7) Which binary search tree operation does the operation method below define?
boolean operation(int v, Node q)
{
if (q == null) return false;
else
if (v == q.getInfo()) return true;
else
if (v < q.getInfo()) operation(v, q.getLeftChild());
else return operation(v, q.getRightChild());
}
(Points : 3)
It displays the binary search tree elements.
It finds if v is contained in the binary search tree.
It inserts v in the binary search tree.
It determines if the binary search tree is empty.
6. (TCO 7) Which binary search tree operation does the method below define?
int method(Node r)
{
if (r==null) return 0;
else
return method(r.leftChild()) + method(r.rightChild()) + 1;
}
(Points : 3)
It returns the number of elements in the binary search tree.
It returns the sum of the elements in the binary search tree.
It returns the smallest element in the binary search tree.
It returns the greatest element in the binary search tree.
7. (TCO 7) The preorder traversal of the following binary tree is _____.
(Points : 3)
30, 19, 14, 6
6, 19, 14, 30
6, 19, 30, 14
30, 19, 6, 14
8. (TCO 7) The postorder traversal of the following binary tree is _____.
(Points : 3)
17, 22, 20, 24, 32, 37
17, 22, 24, 20, 32, 37
22, 24, 17, 32, 20, 37
24, 22, 32, 37, 20, 17
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at [email protected].
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at [email protected] and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at [email protected].
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.