JDRF Electromag Interview Question

What is dynamic programming? Use an example.