Linked Lists Quick Review 

Linked List = An ordered sequence of Link objects

Each linked list has two parts:

  1. First = A value, can be any type (integer, string, linked list)

  2. Rest = Has to be a linked list

Linked lists (very similar to trees) are naturally recursive structures because the rest of a linked list is also a linked list, so any function that can be called on a linked list can be called on the rest of a linked list (here’s your smaller subproblem!)

A key Difference

When working with linked lists, make sure to pay attention to whether you are asked to create and return a new linked list (nondestructive) or mutate an already existing one (destructive). Creating a new linked list means that you call the Link constructor at some point in your code, while mutating means that you are changing the values/links in the given linked list.