add solution for edit distance problem