Solved

Scientists in a Certain Laboratory Are Working with a Linked

Question 28

Multiple Choice

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

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents