Data Structures
How each structure stores data, and what each operation costs.
Data Structures
Arrays Explained: How They Work and What Each Operation Costs
How arrays store data in memory, why reading by index is O(1) but inserting at the front is O(n), and what that means for JavaScript arrays.
· 8 min read
Data Structures
Hash Tables Explained: How Map and Set Find Things Instantly
How a hash table turns a key into a position, why lookups are O(1) on average, how collisions are handled, and when to use Map and Set in JavaScript.
· 10 min read
Data Structures
Linked Lists Explained
How a linked list stores data as nodes joined by pointers, what its operations cost compared with an array, and a simple JavaScript implementation.
· 9 min read
Data Structures
Stacks and Queues Explained
How stacks (last in, first out) and queues (first in, first out) work, what their operations cost, and how to build both correctly in JavaScript.
· 8 min read