Edit Distance
CodeChefOpen on judge ↗
Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations permitted on a word: - Insert a character. - Delete a character. - Replace a character. ###Input: - First line will contains word1. - Second line contains word2. ###Output: -Print the minimum number of operations it takes to convert word1 to word2.
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start