7/39
Part 1 of 7 · Nodes and costsLearn

The O(1) insert needs the node in hand

Insert in the middle and see where the claim stops:

Predict

Insert in the middle of a million items. Which is faster: xs.insert(n // 2, x) on a Python list, or a linked list that walks to the middle first?

Pick an answer above to see the rest