Challenging Difficult Problems
heavy computations thanks to a smart caching system (a cache is a storage system
collecting data or information) called memoization, a term defined later in the
chapter.
This chapter offers you more than a simple definition of dynamic programming.
It also explains why dynamic programming has such a complicated name and how
to transform any algorithm (especially recursive ones) into dynamic program-
ming using Python and its function decorators (powerful tools in Python that
allow changing an existing function without rewriting its code). In addition, you
discover applications of dynamic programming to optimize resources and returns,
creating short tours between places and comparing strings in an approximate
way. Dynamic programming provides a natural approach to dealing with many
problems you encounter while journeying through the world of algorithms.
Do'stlaringiz bilan baham: |