(A) Binary
(B) Unary
(C) Ternary
(D) None of the above
Author:
Suppose A is an array containing numbers in increasing order, but some numbers occur more than once when using a binary search for a value, the binary search always finds?
(A) The first occurrence of a value
(B) The second occurrence of a value
(C) May find first or second occurrence of a value
(D) None of the given options
Which of the given option is NOT a factor in Union by Size?
(A) Maintain sizes (number of nodes) of all trees, and during union
(B) Make smaller tree, the subtree of the larger one
(C) Make the larger tree, the subtree of the smaller one
(D) Implementation: for each root node i, instead of setting parent[i] to -1, set it to -k if tree rooted at i has k nodes
A complete binary tree of height __ has nodes between 16 to 31.
(A) 2
(B) 3
(C) 4
(D) 5
The maximum number of external nodes (leaves) for a binary tree of height H is?
(A) 2^H
(B) 2^H +1
(C) 2^H -1
(D) 2^H +2
__ is a data structure that can grow easily dynamically at run time without having to copy existing elements.
(A) List
(B) Array()
(C) Both of the above
(D) None of the above
Consider a min heap, represented by the following array: 11,22,33,44,55 After inserting a node with value 66.Which of the following is the updated min heap?
(A) 11,22,33,44,55,66
(B) 11,22,33,44,66,55
(C) 11,22,33,66,44,55
(D) 11,22,66,33,44,55
Consider a min heap, represented by the following array: 10,30,20,70,40,50,80,60 After inserting a node with value 31.Which of the following is the updated min heap?
(A) 10,30,20,31,40,50,80,60,70
(B) 10,30,20,70,40,50,80,60,31
(C) 10,31,20,30,40,50,80,60,31
(D) 31,10,30,20,70,40,50,80,60