Week 4 - Linked Lists

Learning objectives

  • Implement common operations, using either iteration or recursion, in a linked list
  • Reason about the efficiency of algorithms working on an array based or linked list

Class Schedule

Monday

  • List Iterators

Tuesday

  • LinkedLists vs ArrayLists
  • Midterm Review

Wednesday

  • Linked Lists & Recursion (Not on midterm, will use next week)

Thursday

  • Midterm - in class. Pen & Paper.

Topics

List Iterators

  • Watch this video on list iterators:

  • Read Liang Ch 20.5

Do the LinkedList Iterator WS

Linked Lists vs Arrays

When should we use the different kinds of lists? Watch this video comparing Linked vs Array lists:

Review

Check out the Midterm Study Guide from the Files link. It has some tips on what to review and some practice questions.

Recursion & Linked Lists

Linked Lists With Recursion

  • Watch this video:

  • Do the LinkedList - Recursion CPPLab. I highly recommend drawing out some pictures while you work on the problems!