← Questions

Edit distance: fewest edits to turn one string into another

0
AmazonCodingLast asked Jul 2026

Given two strings, return the fewest single-character edits that turn the first into the second. An edit inserts one character, deletes one character, or replaces one character with another.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 3 credits: each one unlocks a question for good.

Your code and the AI tutor open when you unlock this question.