6.- You found a question on Stack Overflow: Someone implementing merge-sort for very large arrays found that their solution causes (what else!) a stack overflow! But you know this shouldn't happen...


6.- You found a question on Stack Overflow: Someone implementing merge-sort for very large arrays found that their solution causes (what else!) a stack overflow! But you know this shouldn't happen with merge-sort, and the programmer is careful not to pass arrays or subarrays in recursive calls. What could be causing this problem? a) The array has duplicate elements b) The program is using the wrong splitting rule c) The array is 10 million entries long d) The array is a floating point array e) The merging step is using too much memory 7.- What is the order of the maximum length of a path in any graph with N nodes? a) O(N*M) b) O(M) c) O(M Log N) d) O(N2) e)O(N) 8.- One of the statements below is true regarding Tail Recursion a) It can involve multiple recursive calls in the same function (e.g. tree traversal) b) It results in longer, more complex code c) It requires more storage stack space d) It reduces algorithm complexity e) It allows us to handle much larger recursive problems 9.- A problem that is well suited for a recursive solution doesn't have one of the properties below a) It can appear in many sizes, each of which is the same kind of problem b) It can be broken into smaller chunks c) It naturally leads to a recursive formulation d) It always involves linked data structures e) It can have multiple base cases 10.- Which of the problems below is not well suited for a solution with loops a) Drawing trees and plants b) Copying a graph stored in an adj. matrix c) Counting words in a linked list d) Amino-acid sequence alignment e) Matrix multiplication


May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here