Data Structures in Practice
Compare arrays, lists, hash maps, trees, and heaps by the operations and access patterns they make efficient.
Curriculum (11 steps)
Contains Duplicate
practiceDecide whether any value occurs more than once, and compare a set-based solution with sorting the input.
A hash table transforms a key into a hash value and uses part of that value to select a bucket or slot.
Follow the key state changes and boundary checks involved in hash tables: from keys to buckets.
An interactive concept flow for hash tables: from keys to buckets, from its assumptions through the main operation and boundary checks.
Top K Frequent Elements
practiceReturn the k values with the highest frequency; define a deterministic tie policy for your implementation.
Find Median from Data Stream
practiceDesign a structure that accepts numbers one at a time and reports the median of all values seen.
Explain the model, execution steps, complexity, and limits of trees and heaps solve different ordering problems.