- Compare abstract data types and concrete data structures
- Abstract data types: list
- Concrete data structures: array, dynamic array (resizable array, vector), linked list
- Review Make School's array and linked list slides
- Watch Make School's array and linked list video lecture
- Read Vaidehi Joshi's articles on linked lists, part 1: how they work and part 2: complexity analysis and comparison to arrays with excellent, beautiful drawings
- Watch HackerRank's linked list video
- Watch Harvard's array video, singly linked list video, and doubly linked list video
- Play with VisuAlgo's interactive linked list visualization
- Add new features to
LinkedList
class using linked list starter code:- Add
size
property that tracks list length in constant running time - Implement
get_at_index(index)
- returns the item atindex
in the list - Implement
insert_at_index(index, item)
- insertsitem
atindex
(all items afterindex
are moved down) - Implement
replace(old_item, new_item)
- replacesold_item
in the list withnew_item
using the same node - Run
python linkedlist.py
to testLinkedList
class instance methods on a small example - Run
pytest linkedlist_test.py
to run the linked list unit tests and fix any failures
- Add
- Annotate methods with complexity analysis of running time and space (memory)
- Implement
DoublyLinkedList
class withBinaryNode
objects, which have bothnext
andprevious
properties - Write unit tests for to ensure the
DoublyLinkedList
class is robust- Include test cases for each class instance method and property
- Annotate methods with complexity analysis of running time and space (memory)