- 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
LinkedListclass using linked list starter code:- Add
sizeproperty that tracks list length in constant running time - Implement
get_at_index(index)- returns the item atindexin the list - Implement
insert_at_index(index, item)- insertsitematindex(all items afterindexare moved down) - Implement
replace(old_item, new_item)- replacesold_itemin the list withnew_itemusing the same node - Run
python linkedlist.pyto testLinkedListclass instance methods on a small example - Run
pytest linkedlist_test.pyto run the linked list unit tests and fix any failures
- Add
- Annotate methods with complexity analysis of running time and space (memory)
- Implement
DoublyLinkedListclass withBinaryNodeobjects, which have bothnextandpreviousproperties - Write unit tests for to ensure the
DoublyLinkedListclass is robust- Include test cases for each class instance method and property
- Annotate methods with complexity analysis of running time and space (memory)