What is wrong with the following recursive algorithm?Algorithm recursiveAlgorithm(n) if (n equals 0) return recursiveAlgorithm(1) end if return n + recursiveAlgorithm(n-1)end recursiveAlgorithm
A. The base case calls the recursive algorithm
B. The base case should be 1
C. The general case does not reduce the size of the problem
D. It should not have a base case
Answer: A
You might also like to view...
TCP is an example of which of the following?
What will be an ideal response?
Page Preview allows the user to see what the document will look like on paper before it is actually printed
Indicate whether the statement is true or false
The word with denotes the beginning of a ________, an instruction that enables the macro to perform multiple operation on a single object.?
A) VBA with B) VBA constrict C) VBA procedure D) VBA construct
Which file-sharing protocol distributes the role of a file server across a collection of dispersed computers?
A. FTP B. UDP C. Dropbox D. BitTorrent