3.03 Question Set
- Due Oct 29, 2014 at 10:59pm
- Points 3
- Questions 3
- Time Limit None
- Allowed Attempts Unlimited
Instructions
Read Section 4.5 (pages 269 - 273) of the textbook.
Next, review the Recursive Linked-List Processing presentation.
Then, answer the following 3 questions taken from the reading based on the following scenario.
You are a Computer Science Teaching Assistant at a major university, and you are evaluating a Data Structures programming class assignment. Right now the class is studying recursion, and students have been given this simple assignment: Write a recursive method sumSquares that takes a reference to a linked list of Integer elements and returns the sum of the squares of the elements. The list nodes are of class LLNode. The objects in the list are all of class Integer. The diagram below illustrates the linked list called list:
Please evaluate the following student response, and then select the best answer from those listed below. Assume that the list is not empty.