1) Which of the following is true about the recursive version of the function fo
ID: 3842935 • Letter: 1
Question
1) Which of the following is true about the recursive version of the function for calculating a factorial?
a. The recursive case is the line "return n * factorial(n-1);"
b. The base case of the function is where the recursion stops
c. The solution performs significantly faster than the non-recursive version
d. None of the above
2) Which of the following is true about the sort algorithms?
a. Bubble sort comparisons on average are faster than Insertion sort
b. Insertion sort is faster than Quicksort when the array is nearly sorted
c. Quicksort is as fast, if not faster, than Mergesort but requires twice the memory space because it uses a temporary array
d. None of the above
3) Which of the following is true about using a 2-3-4 tree?
a. During insert, a node splits when it becomes full after adding a new data element
b. If values are inserted in sorted order, the 2-3-4 tree will no longer be balanced and search degrades to O(n)
c. When a node is split, a new root node is created
d. None of the above
Explanation / Answer
Which of the following is true about the recursive version of the function for calculating a factorial?
a. The recursive case is the line "return n * factorial(n-1);"
b. The base case of the function is where the recursion stops
c. The solution performs significantly faster than the non-recursive version
d. None of the above
2) Which of the following is true about the sort algorithms?
a. Bubble sort comparisons on average are faster than Insertion sort
b. Insertion sort is faster than Quicksort when the array is nearly sorted
c. Quicksort is as fast, if not faster, than Mergesort but requires twice the memory space because it uses a temporary array
d. None of the above
3) Which of the following is true about using a 2-3-4 tree?
a. During insert, a node splits when it becomes full after adding a new data element
b. If values are inserted in sorted order, the 2-3-4 tree will no longer be balanced and search degrades to O(n)
c. When a node is split, a new root node is created
d. None of the above
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.