Samsung Electronics Interview Question

What is the use of dynamic programming?