Skip to content

Glossary: Algorithms Beyond the Basics in C++

swap argument

A way to show a greedy choice is safe: swap the first choice of any best answer for the greedy one and show the result is no worse.

Where the book teaches it