TikTok interview question

Coding a function calculating the editing distance of two strings