Microsoft interview question

Leet code Medium question Edit distance