Checkpoint: The Data Model
advanced35 min readLesson 111 of 169
Implement a protocol-complete, slotted linked list β the module's skills in one object.
Checkpoint β build a protocol-complete linked list
No starter code beyond the class shells. Requirements:
LinkedList(items=())builds from any iterablelen(), iteration (headβtail),x in list,reprasLinkedList(1 -> 2 -> 3)- indexing:
l[i]with negative indexes supported;l[1:3]returns a newLinkedList(support asteptoo) prepend(x)is O(1);reverse()returns a new list, original untouched- both classes use
__slots__β no__dict__on instances
Grading runs the full protocol battery against your implementation, plus a plausible-but-wrong variant to make sure the tests bite.