Create Edit Distance Algorithm