Scientists in a certain laboratory are working with a linked list class that uses recursion to compute its size. The scientists know that an empty list has size 0, so they never ask a linked list to compute its size when the list is empty. Under these circumstances,
A) the recursive method can become more efficient by eliminating the test for a base case
B) the recursive method should still handle the base case of an empty list, because it will still occur even though the scientists never ask for the size of an empty list
C) the recursive method can be modified to use a list of size 1 as the base case
D) B and C are both correct
D) B and C are both correct
You might also like to view...
How do the Linux fork and clone system calls differ? How are they alike?
What will be an ideal response?
Suppose that we use the deferred update protocol for the example in Figure 23.6. Show how the log would be different in the case of deferred update by removing the unnecessary log entries; then describe the recovery process, using your modified log. Assume that only redo operations are applied, and specify which operations in the log are redone and which are ignored.
What will be an ideal response?
Which type of file may be used to export an Access report and reduce the file size to minimize downloading time?
A. PDF B. XML C. HTML D. CSV
COGNITIVE ASSESSMENT Optical discs store items by using microscopic ______ (indentations) and ______ (flat areas).
A. dents/mesas B. bumps/smooths C. pits/lands D. holes/levels