Given a complete binary search tree consisting of 15 elements, the height of the tree is:
A. 15
B. 8
C. 7
D. 3
00001=1
00010=2
00011=3
00100=4
00101=5
00110=6
00111=7
01000=8
01001=9
01010=10
01011=11
01100=12
01101=13
01110=14
01111=15
The answer should be D. assuming you do not count the ground layer (if you are European it would be 4 XD)
The following pseudocode, which has a worst-case timing of $$O(n^2)$$, is what type of classical sort algorithm?
A. Bubble sort
B. Insertion sort
C. Merge sort
D. Quick sort
The final value of Q in the following flowchart is most nearly:
A. 0
B. 1
C. 3
D. 5
The following function counts down starting at Y. What number does the countdown return if it is called with Y= 10?
A. -1
B. 0
C. 1
D. 10