Austin Clements

Quiz 2 Errata

  • Front page - "Section time" = Recitation time
  • Front page - "Austin Clement" should be "Austin Clements"
  • Question 8 - set-next!/set-prev! should change next/prev (it should _not_ find end of dlist)
  • Question 13 - You are allowed to use expressions that are not in the list

Solutions clarifications

There were dozens of possible, correct solutions many of the problems. Part 3 had two alternate interpretations, both of which we accepted. The intended interpretation of set-next!/previous! was to simply change the next or previous pointer of the given dlist cell. This meant that postpend! and prepend! had to patch up both the previous pointer of the left list and the next pointer of the right list. Alternatively, set-next!/previous! could have set both the next/previous pointer of the dlist cell and the previous/next pointer of the predecessor/successor, respectively. In this case, the solutions to postpend! and prepend! are simplified, since they don't have to patch up the reverse pointers.