6.S095 | January IAP 2018 | Undergraduate

Programming for the Puzzled

Puzzle 11: Memory Serves You Well

Repeatedly solving the same problem is boring for a human, and inefficient in a computer program or algorithm. This video describes the powerful technique of memoization to avoid redundant work, and applies it to efficiently solve a coin selection puzzle.

Puzzle Description

Python Code

Assignment

  • Do one or more of the exercises in the Memory Serves You Well puzzle.

Solution

Programming Constructs and Algorithmic Paradigms Covered in this Puzzle

  • Dictionary creation and lookup
  • Exceptions
  • Memoization in recursive search

Course Info

Instructor
As Taught In
January IAP 2018
Learning Resource Types
Lecture Videos
Programming Assignments with Examples