Skip to content
fiveyearsdev

Tag

#data-structures

10 articles tagged data-structures.

DSAbeginner

Arrays and Dynamic Arrays: Random Access and Amortized O(1) Append

A diagram-first guide to the array and dynamic array data structure: O(1) random access, why append is amortized O(1) via doubling, time complexity, and interview questions.

14 min read
DSAintermediate

Balanced Search Trees: How AVL and Red-Black Trees Stay Fast

Balanced search trees explained: AVL and red-black, the self-balancing binary search tree data structure that guarantees O(log n). Rotations, time complexity, and interview questions.

17 min read
DSAintermediate

Binary Search Trees: One Rule for Fast Search, Insert, and Delete

A diagram-first guide to the binary search tree data structure and its algorithms: search, insert, in-order sort, and the three delete cases, with time complexity and interview questions.

14 min read
DSAbeginner

Binary Trees Explained: Traversals, Height, and Why In-Order Is Sorted

A diagram-first guide to the binary tree data structure: nodes, terminology, the three DFS traversals plus level-order BFS, height and time complexity, and a complete interview-ready implementation.

15 min read
DSAbeginner

The Graph: How Software Models Maps, Friends, and the Web

A diagram-first guide to the graph data structure: vertices and edges, adjacency list vs matrix, degree, connected components, time complexity, and a complete implementation for interviews.

13 min read
DSAintermediate

Hash Tables Explained: How Maps and Sets Get O(1) Lookups

A diagram-first guide to the hash table data structure: hashing, buckets, collisions, chaining, load factor, resize, equals/hashCode contract, time complexity, and hash map interview questions.

18 min read
DSAintermediate

Linked Lists Explained: Nodes, Pointers, In-Place Reversal, and Floyd's Cycle Detection

A diagram-first guide to the linked list data structure: singly vs doubly linked nodes, O(1) splicing, in-place reversal, Floyd cycle detection, plus time complexity and interview prep.

14 min read
DSAintermediate

Queues and Deques: FIFO, the Circular Buffer, and the Sliding-Window Trick

A diagram-first guide to the queue and deque data structure: FIFO enqueue and dequeue, the circular buffer (ring) fix, sliding window maximum, time complexity, and interview questions.

14 min read
DSAbeginner

The Stack: Undo, Recursion, and the O(n) Trick Interviewers Love

The stack data structure (LIFO) explained: push, pop, peek in O(1), the call stack behind recursion, and the monotonic stack, with time complexity and a full implementation for your coding interview.

13 min read
DSAintermediate

Union-Find (Disjoint Set Union): Merging Groups in Almost No Time

A diagram-first guide to the union-find (disjoint set union) data structure: find and union, path compression, union by rank, near-constant time complexity, and interview code.

12 min read