Explain 'Dynamic Programming' for Edit Distance.
Explain 'Dynamic Programming' for Edit Distance.
Approach: Describe the O(nm) algorithm for finding the minimum number of edits between strings.
A matrix is used where cell (i, j) represents the minimum edits to convert the first i characters of string A to the first j characters of string B. Operations include insertion, deletion, and substitution.
Follow-up: What is the space complexity, and can it be optimized?
Key concepts: levenshtein distance, subproblems, table.