Algorithm Intuition (part 1 of 2)
summary
Walks through concrete STL uses: generates sequences with iota, computes sums with accumulate/transform_reduce, finds both extremes with min_max_element returns both min and max, and computes adjacent gaps with adjacent_difference to solve “min difference” in O(n log n) then O(n) with min/max. Shows inner_product as a practical inner_product acts as zip+reduce for pairing two ranges (poster/ladder problem), demonstrates reduce/fold can express ~77 other algorithms, and cites 111 total STL algorithms plus C++17/20 range and parallel features.
AI-written summary · about
chapters (22)
- 0:00Intro
- 2:59Bitesize problems
- 5:12Algorithms
- 10:26Sean Parent
- 10:58Black Mirror
- 11:51Interview Warmup
- 17:08Continuous learning
- 20:21STL algorithms
- 24:46IOTA shaming
- 28:11Accumulation
- 29:55Fold and Reduce
- 34:52adjacent difference
- 41:22example
- 47:37Matts talk
- 48:42The problem
- 51:34Transform Reduce
- 51:53Transform Reduce Code
- 52:47cpp Reference
- 53:17Questions
- 53:34Debuggers
- 55:54Conclusions
- 57:10QA
related talks
56mBeginners Guide to C++'s Best Kept Secret -- std::algorithm
01h 31mSTL Algorithms – How to Use Them and How to Write Your Own
01h 35mThe Twin Algorithms
46mC++ Fundamentals - Algorithms
01h 23mAlex Stepanov, Generic Programming in Cpp, and the STL
05mC++ Sequential Considered Harmful
04mEuclid's Algorithm & STL
01h 25mNew Algorithms in C++23
