Euclid's Algorithm & STL
summary
Demonstrates that replacing the subtraction step in Euclid's GCD with a swap instead of subtract and advancing an iterator yields the core loop of std::rotate implemented over a container the talk constructs a recursive rotate and proves it terminates because the step size is governed by the GCD claims that this simple change maps the ancient GCD algorithm to a common STL routine and shows the implementation actually works on iterators recursive rotate whose termination uses GCD
AI-written summary · about
related talks
01h 35mThe Twin Algorithms
01h 01mAlgorithm Intuition (part 2 of 2)
01h 23mAlex Stepanov, Generic Programming in Cpp, and the STL
56mBeginners Guide to C++'s Best Kept Secret -- std::algorithm
01h 01mAlgorithm Intuition (part 1 of 2)
46mC++ Fundamentals - Algorithms
05mAlgorithm Magic
01h 25mNew Algorithms in C++23
