CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #905 #907 →

#906. Edit distance

You get two words. Find the smallest number of operations (insert, delete or replace a letter) needed to turn one into the other. ### Input Two lines. ### Output A number.

Examples

Input
banana
flower
Output
6
Input
apple
castle
Output
3

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!