Pergunta de entrevista da empresa Samsung Electronics

What is the use of dynamic programming?