Skip to main content

LinkedList, protocol-complete

Challenge on lesson: Checkpoint: The Data Model

Implement Node and LinkedList per the checkpoint specification: len, iteration, membership, repr 'LinkedList(1 -> 2 -> 3)', int indexing with negatives, slicing to a new LinkedList (with step), O(1) prepend, non-mutating reverse, and __slots__ on both classes.

Difficulty: advanced

Back to lesson: Checkpoint: The Data Model