Array Recap

Arrays are stored in memory with an address and an offset.

We’ve done an array implementation of a List (let’s call it “arraylist”), and it is pretty good:

Arrays
E get(i) O(c)
set(E) O(c)
add(E) O(c) + O(resize)
add(E, i) O(n)
E remove(i) O(n)

Nodes

under construction

Assignment

  1. Write a print function (5 points)
  2. Change the singly linked list to a doubly linked list (5 points)
  3. Write the bubblesort function (10 points)
  4. Write any other sort function (5 points)

clone link: https://github.com/daltonschool/CS3A-Linked.git

Due 11/9, resubmission due 10/24