✏️ Edit Distance (Levenshtein Distance)

Dynamic Programming Algorithm Visualization

📝 Custom Input

Quick Examples:
Current Input: word1 = "horse", word2 = "ros" Expected Output: 3
Empty Cell
Current Cell
Filled Cell
Dependency Cell
Word 1
Word 2
DP Table: dp[i][j] = min operations to convert word1[0..i-1] to word2[0..j-1]
Current Operation Analysis
Step 0 of 0

Step 0: Ready to Start

Use the Next button to step through the dynamic programming algorithm, or Previous to go back.

📊 Algorithm State

Current i: 0
Current j: 0
Current Cell: dp[0][0]
Min Operations: 0

📝 Problem Info

Word 1 Length: 5

Word 2 Length: 3

Table Size: 6×4

Time Complexity: O(m×n)

Space Complexity: O(m×n)