Linked Structures
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
- Write a print function (5 points)
- Change the singly linked list to a doubly linked list (5 points)
- Write the bubblesort function (10 points)
- Write any other sort function (5 points)
clone link: https://github.com/daltonschool/CS3A-Linked.git
Due 11/9, resubmission due 10/24