When The List Wins
Open Data Structures summarises the linked list trade in one line: you lose constant-time get(i), but given a reference to a node you can insert or delete next to it in constant time.
Four teams each want to swap a contiguous array for a doubly linked list. In which case does the linked list actually pay for its pointer overhead and cache misses?
Sign in to answer questions and track your progress
Sign In