Chapter 4 Revision: Lists
Lists form the backbone of sequential data structures. Whether laid out contiguously in dynamic arrays to maximize hardware cache lines or linked dynamically across memory heaps, list architectures power everything from compiler symbol scopes to OS thread schedulers.
Use these flashcards for active recall. Try to answer the question out loud before clicking the card to flip it.
Flashcards 🎴
What are the trade-offs between ArrayList (dynamic array) and LinkedList (doubly linked)?
• LinkedList: O(1) insertion/deletion once a node reference is held, but O(N) traversal access, pointer chasing, and 16–24 bytes of pointer overhead per element.
Why is Geometric Capacity Resizing (doubling) necessary for dynamic arrays?
How does a Scoped Symbol Table represent nested lexical environments?
How are Sparse Polynomials represented efficiently using linked lists?
(coefficient, exponent) pairs sorted by descending exponent. Adding two polynomials merges nodes in linear O(N + M) time, skipping zero-coefficient terms and avoiding huge arrays for high-degree terms like x^1000000.What is a Multilevel Feedback Queue (MLFQ) in operating systems?