A traversal of the binary search tree in figure is given as:
12, 27, 25, 28, 20, 38, 45, 42, 35, 30
Determine one which of the following traversals has been performed
A -
Reverse PreOrder Traversal
B -
InOrder Traversal
C -
PostOrder Traversal
D -
#
2-
A pedigree chart is stored in a binary tree. From the following choices, the easiest way
to implement a method that will print out that pedigree chart one generation at a time (parents
first, then grandparents, then great-grandparents, etc.) is to use a
A -
stack
B -
All of the above
C -
queue
D -
binary search tree
3-
A rood tree is a directed graph in which each node is referenced by at most ____ node(s)
A -
1
B -
0
C -
2
D -
3
4-
A binary tree is a tree in which each node is referenced by at most ____ node(s)
A -
2
B -
0
C -
3
D -
1
5-
A preorder traversal of this tree below is:
A -
30 5 20 8 1 15 12 18 10 25 35
B -
20 30 5 8 1 15 12 18 10 25 35
C -
20 30 5 1 15 12 8 18 10 25 35
D -
20 30 5 8 1 15 12 18 25 35 10
6-
A searching algorithm requires at most 100n^3log(n) + 25n^5 comparisons to search an
array of n elements. The worst-case time complexity for the algorithm
A -
100n^3log(n)
B -
O(n^3)
C -
O(n^8)
D -
O(n^5)
7-
A particular algotithm uses #:
A -
0
B -
d
C -
b
D -
c
8-
A method is to be written to search an array for a specified item and return its index. The
problem specifications do not indicate do not indicate what should be returned if the item sought appears in more than one place in the array. Which of the following actions would be most
appropriate?
A -
the specifications should be modified to indicate what be done if there are duplicate entries
B -
the method should be written so as to output an error message if there are duplicate entries
C -
the method should be written so as to return the index of all instances of the item
D -
the method should be written so as to delete duplicate entries if any are found
9-
After delete node 2, the node #.
A -
3
B -
5
C -
7
D -
4
10-
After execution of the statement:
Char *p = "Stuff";
What would be printed by following statement?
printf ("%c", *p+3);