Cost & complexity
Every card that turns on a cost argument — time, space, or both. Short, and unforgiving about hand-waving.
Try a card
Algorithms & data structures1 of 3
Say it in your head first.
Questions
- 01What are quicksort's average and worst-case time complexities?
- 02What invariant makes binary search correct?
- 03When does a hash table degrade to O(n) lookup?
- 04What does amortized O(1) mean for pushing onto a dynamic array?
- 05What does a Bloom filter trade away for its small size?
- 06What is the cost of building a heap from n elements at once?
- 07Why is a balanced BST O(log n) when a plain BST is not?
- 08What does memoizing a naive recursive Fibonacci change about its complexity?
…and 2 more cards. The answers are yours to find.
