CS 70

Homework 5: Snaking a Path through Linked Lists and Iterators

Teaser…

We're continuing our theme of linear data structures. Last assignment, we showed how a maze solver could use a stack or a queue to explore the maze in different ways. In this week's assignment, we'll be using linear data structures in an interactive Snake game!

Overview

In addition to having fun with the Snake game, in this week's assignment, you will practice

  • Planning the design and implementation the IntList data structure.
  • Developing testing strategies to uncover bugs in your code.
  • Implementing a singly linked list, providing constant-time steque operations and more.
  • Implementing an iterator for your linked list.
  • Implementing a copy constructor, assignment operator, and comparison operator for your linked list.
  • Analyzing the complexity of your code from a theoretical and empirical perspective.

Getting Started

This assignment is paired, and your repository belongs to your pair. We have already made it—there is nothing to accept and no name to agree on. Your pairing came from the pairing board, and the repository is named after your group. (It is the same pair as Homeworks 4 and 6.)

Both of you have push access to that one repository, so you are working in the same place rather than each having a copy to reconcile later.

  • Hedgehog speaking

    The link says the page doesn't exist!

  • LHS Cow speaking

    That usually means you are not in the CS 70 GitHub organization yet, rather than that your repository is missing. GitHub hides what you cannot see rather than admitting it is there.

  • Cat speaking

    So "not found" and "not allowed" look the same on purpose.

  • LHS Cow speaking

    Exactly—so that nobody can go fishing for the names of private repositories. On the server, cs70-fix-access will check your membership and sort most of this out for you.

Clone your repository on the CS 70 server to get started:

git clone https://github.com/hmc-cs70-fall2026/repo.git

Steps

Useful Information

Ask for (and give each other) help!

Post your questions there, and be sure to answer each other's. Even if you're not 100% sure of an answer, it's okay to jump in and try—we're all here to help each other!

Resources

You may find these resources helpful:

Refresh your familiarity with the coding idioms we expect you to use:

(When logged in, completion status appears here.)