Glossary: Algorithms Beyond the Basics in Go
Optimal substructure
The best answer to a big problem is built from the best answers to smaller ones, like `ways(n)` from `ways(n-1)` and `ways(n-2)`.
Glossary: Algorithms Beyond the Basics in Go
The best answer to a big problem is built from the best answers to smaller ones, like `ways(n)` from `ways(n-1)` and `ways(n-2)`.