Now I'll show you 2D (two-dimensional) DP on strings. This is completely different from grids or resource tracking. You're given two strings A and .
You can insert, delete, or replace characters. What's the minimum operations to convert A into ? Before reading on, think: what information do you need to describe your progress? Read the problem statement carefully, noting the constraints. Try to identify the recursive structure before looking at the solution.