NOTE: Fill in with the appropriate items
Elapsed | Time | Activity |
---|---|---|
0:00 | 0:05 | Objectives |
0:05 | 0:15 | Overview |
0:20 | 0:45 | In Class Activity I |
1:05 | 0:10 | BREAK |
1:15 | 0:45 | In Class Activity II |
TOTAL | 2:00 |
NOTE: Fill in with the appropriate items
By this end of this lesson, students should be able to...
- Practice more advanced techniques with lists and arrays
- Implement various list manipulation methods such as insert and replace
- 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)