CIS 110 Spring 2013 - Introduction to Computer Programming

upenn.edu | directories | van pelt library
seas.upenn.edu | CETS | engineering library
computer graphics & game dev (SIGGRAPH @ Penn) | dining philosophers (DP) | science & tech wing (STWING) | women in cs (WICS)
CETS Answers

Recitation 8 Exercises

Goals

The goals of this week's recitation assignments are to learn why Linked Lists are important, how Linked Lists are structured, and how to perform operations on Linked Lists.

Exercises

  • Why would someone use a Linked List over an array for storing data?
  • Write a function that will sum up all the values in a linked list. Assume you have a Node class with two instance variables: int value and Node next. A parameter for this function will be a Node head which will represent the head of the Linked List.