Which of the following statements could describe the base


1.) You are using a language that does not support recursion. What data structure would you use to traverse a binary search tree in order?
A. Queue
B. List
C. Stack
D. Can't traverse a tree in order without recursion

2.) The data structure that keeps track of activation records during the execution of a program
A. Run-time queue
B. Run-time stack
C. Linked list
D. Heap

3.) Which of the following statements could describe the base case of a recursive algorithm?
A. F(x) = x - F(x - 1)
B. If the array length is 100, do nothing
C. All parameters are integers
D. F(0) = 27
E. B and D above

4.) IntFunc(/*in*/int n)
{
If (n == 5)
Return 5;
Else
Return 2 * Func (n+1);
}
What is the value of the expression Func (2)?

5.) The three-question testing method is based on what computing technique?
A. Top-down design
B. Object-oriented design
C. Induction
D. Divide/conquer
E. Answer not shown

6.) Draw the binary search tree containing the following 11 values in the order shown and answer the question.
15 7 9 21 44 30 33 29 10 1 17 ( in that order).
What level is the value of 17 ( root is level 0)?
A. 0
B. 1
C. 2
D. 3
E. 4

7.) Draw the binary search tree containing the following 11 values in the order shown and answer the question.
15 7 9 21 44 30 33 29 10 1 17 ( in that order).
Which is the inorder successor of 15?
A. 10
B. 9
C. 17
D. 7
E. 44

8.) Draw the binary search tree containing the following 11 values in the order shown and answer the question.
15 7 9 21 44 30 33 29 10 1 17 ( in that order).
How many levels are in the tree?
A. 3
B. 4
C. 5
D. 6
E. Unknown

9.) Draw the binary search tree containing the following 11 values in the order shown and answer the question.
15 7 9 21 44 30 33 29 10 1 17 ( in that order).
Which is the inorder predecessor of 44?

A. 29
B. 30
C. 21
D. 33
E. Unknown

10.) Draw the binary search tree containing the following 11 values in the order shown and answer the question.
15 7 9 21 44 30 33 29 10 1 17 ( in that order).
How many nodes are there on level 2 (root is level 0)?
A. 2
B. 3
C. 4
D. 5
E. Unknown

11.) The value property of heaps says that the value in a node is
A. Greater than the values of its children.
B. Less than the values of its children.
C. Greater than or equal to the values in its children.

12.) ReheapDown restores the heap property after
A. An insertion
B. A deletion

13.) An adjacency matrix is a way of representing
A. Vertices
B. Edges
C. Vertices and edges

14.) A heap must be a full binary tree.
A. True
B. False

15.)Two or more keys that produce the same hash location are called
A. Synonyms
B. Collision
C. Clustering

16.) Radix Sort makes use of which of the following container classes?
A. Stack
B. Queue
C. Dequeue
D. Heap
E. Binary search tree

17.) A bucket (in hashing) is
A. a container for water
B. collection of synonyms
C. clusters

18.) Quick sort is always quick
A. True
B. False

19.) Merge sort requires extra space
A. True
B. False

20.) Which is true?
A. O(1)
B. O(logN)
C.O(N)
D. O(N*N)

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Which of the following statements could describe the base
Reference No:- TGS01241572

Now Priced at $30 (50% Discount)

Recommended (90%)

Rated (4.3/5)