Learned 0 of 34 topics. Saved 0.

Saved topics and progress stay in this browser on this device. Nothing is sent anywhere. Suggested next topic: Dynamic array.

Beginner

Core structures and the two basic searches. Learn these first.

  1. Read

    Index O(1); append O(1) amortized; insert or delete in the middle O(n)

  2. Read

    O(n); O(1) if the target is firstLearn first: Dynamic array.

  3. Read

    Push, pop, peek O(1)Learn first: Dynamic array.

  4. Read

    Enqueue and dequeue O(1) with a dequeLearn first: Dynamic array.

  5. Read

    Lookup, insert, delete O(1) expected; O(n) worst caseLearn first: Dynamic array.

  6. Read

    Expected O(n) totalLearn first: Hash table (dict and set).

  7. Read

    O(n)Learn first: Dynamic array.

  8. Read

    O(log n)Learn first: Linear search.

Intermediate

Sorting, trees, graphs, and the patterns behind most interview questions.

  1. Read

    Insert or delete at a known node O(1); search O(n)Learn first: Dynamic array.

  2. Read

    Θ(n log n) in every caseLearn first: Binary search.

  3. Read

    Θ(n log n) average; Θ(n²) worst caseLearn first: Mergesort.

  4. Read

    O(n) to build; O(1) per range sumLearn first: Dynamic array.

  5. Read

    O(n)Learn first: Two pointers.

  6. Read

    O(n) totalLearn first: Stack.

  7. Read

    Search, insert, delete O(h): O(log n) balanced, O(n) worst caseLearn first: Binary search, Linked list.

  8. Read

    O(n)Learn first: Binary search tree, Stack.

  9. Read

    Peek O(1); push and pop O(log n); build from n items O(n)Learn first: Dynamic array, Binary search tree.

  10. Read

    Edge check: matrix O(1), list O(deg(u))Learn first: Hash table (dict and set), Dynamic array.

  11. Read

    O(V + E)Learn first: Queue and deque, Graph representations.

  12. Read

    O(V + E)Learn first: Stack, Graph representations.

  13. Read

    O(n log n)Learn first: Mergesort.

Advanced

Weighted graphs, balanced structures, and problems that need a recurrence.

  1. Read

    Θ(n log n) for distinct keysLearn first: Binary heap and priority queue, Mergesort.

  2. Read

    Θ(n + k) for values in a range of size kLearn first: Quicksort.

  3. Read

    O(n log n) worst case; O(n) on already-sorted inputLearn first: Mergesort.

  4. Read

    Search, insert, delete O(log n) worst caseLearn first: Binary search tree.

  5. Read

    Insert and search O(m) for a key of length mLearn first: Hash table (dict and set), Tree traversals.

  6. Read

    Amortized O(α(n)) per find or unionLearn first: Graph representations.

  7. Read

    O((V + E) log V) with a binary heapLearn first: Breadth-first search (BFS), Binary heap and priority queue.

  8. Read

    O(V · E)Learn first: Dijkstra's algorithm.

  9. Read

    O(E log E)Learn first: Union-Find (disjoint-set union), Quicksort.

  10. Read

    O(E log V) with a binary heap; O(V²) with an arrayLearn first: Dijkstra's algorithm.

  11. Read

    O(2ⁿ) subsets; O(n · 2ⁿ) including copying each oneLearn first: Depth-first search (DFS).

  12. Read

    O(n · n!) to generate allLearn first: Backtracking and subsets.

  13. Read

    Number of states × transitions per stateLearn first: Backtracking and subsets, Hash table (dict and set).

Clears saved and learned topics, the last topic you opened, and quiz and challenge results.

Keyboard shortcuts

/
Search topics
?
Show this list of shortcuts
r
Open the revision sheet
b
Save or unsave the focused card, or the topic you are reading
l
Mark the focused card, or the topic you are reading, as learned
Space Left arrow Right arrow
In the visualizer: play or pause, step back, step forward
1 to 4 Enter
In the quiz: pick an answer, then go to the next question
Escape
Close this list