Dynamic programming is a strategy for designing algorithms that breaks problems down into recurring subproblems. It is useful when a problem can be solved by combining the solutions of its subproblems. The longest common subsequence problem finds the longest shared subsequence between two sequences and can be solved using dynamic programming by building up the solution from overlapping subproblems. Computing the nth Fibonacci number can also be solved with dynamic programming by storing and reusing previously computed values rather than recomputing them.