The Runtime Theory
medium · 3h · 11 steps

Data Structures in Practice

Compare arrays, lists, hash maps, trees, and heaps by the operations and access patterns they make efficient.

Curriculum (11 steps)

1

An array stores elements in contiguous indexed positions.

Start→
2

Decide whether any value occurs more than once, and compare a set-based solution with sorting the input.

Start→
3

Two Sum

practice

Return the indices of two distinct values whose sum equals the target.

Start→
4

A hash table transforms a key into a hash value and uses part of that value to select a bucket or slot.

Start→
5

Follow the key state changes and boundary checks involved in hash tables: from keys to buckets.

Start→
6

An interactive concept flow for hash tables: from keys to buckets, from its assumptions through the main operation and boundary checks.

Start→
7

LRU Cache

practice

Implement get and put in constant average time while evicting the least recently used key at capacity.

Start→
8

A search tree organizes keys so comparisons guide a search toward one subtree.

Start→
9

Return the k values with the highest frequency; define a deterministic tie policy for your implementation.

Start→
10

Design a structure that accepts numbers one at a time and reports the median of all values seen.

Start→
11

Explain the model, execution steps, complexity, and limits of trees and heaps solve different ordering problems.

Start→