Exercises/#56 Edit Distance
#56

Edit Distance

Hard🧩 Dynamic Programming
120 XP

Problem

Given two strings word1 and word2, return the minimum number of operations (insert, delete, replace) to convert word1 to word2.

Examples

Input: word1='horse', word2='ros'
Output: 3

Input: word1='intention', word2='execution'
Output: 5
dynamic-programmingstring
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

56 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features