Glossary: Algorithms Beyond the Basics in Rust
Optimal substructure
A problem has this when the best answer to the big question is built from best answers to smaller ones, like `ways(n)` from `ways(n - 1)` and `ways(n - 2)`.
Glossary: Algorithms Beyond the Basics in Rust
A problem has this when the best answer to the big question is built from best answers to smaller ones, like `ways(n)` from `ways(n - 1)` and `ways(n - 2)`.