An implementation of Levenshtein Distance, allowing for swapping of two elements