Counting Sort and Input Enhancement
Trading a table for a loop, and beating n log n by knowing the keys.
What this unit covers
Unit 7: Space and Time Trade-offs
- 1 Counting Sort and Input EnhancementTrading a table for a loop, and beating n log n by knowing the keys. · 18 min
- 2 HashingTurning a key into an address, and paying for collisions. · 19 min
- 3 Binary Search TreesOrder maintained for free, and the shape that decides the cost. · 19 min
- 4 Horspool and Boyer–Moore String MatchingPrecompute a shift table, and never look at most characters at all. · 18 min