Interact with classic data structures. Run operations and watch the structure respond in real time.
A LIFO structure — push adds to the top, pop removes the top, peek inspects it. All O(1).
A FIFO structure — enqueue adds to the rear, dequeue removes from the front, peek inspects it. All O(1).
A chain of nodes where each points to the next. Insert/delete at the ends in O(1); search is O(n).
Like a linked list, but each node also points to the previous one — enabling traversal in both directions.
An ordered tree where every left child is smaller and every right child larger. Insert, search, and delete in O(log n) on average, and traverse it breadth-first (level-order) or depth-first (pre-, in-, and post-order).
Maps keys to buckets with a hash function for O(1) average lookup. Collisions are handled by chaining entries within a bucket.
Explore a graph from a start node. Breadth-first search fans out level by level using a queue; depth-first search dives deep using a stack.
A binary heap that always serves the highest-priority element first. Insert sifts up and extract sifts down in O(log n); peek is O(1). Switch between a min-heap and a max-heap.
Stores strings character by character so words with shared prefixes share a path. Insert, search, and prefix-match all run in O(L) for a word of length L.
A binary search tree that rotates after every insert and delete to keep itself balanced, guaranteeing O(log n) operations. Each node's balance factor stays within {-1, 0, 1}.
Tracks a partition of elements into disjoint sets. Union merges two sets by rank and Find locates a set's root with path compression, giving near-constant amortized time.