# Questions tagged [edit-distance]

Challenges which relate to calculating some type of edit distance (such as Levenshtein distance), or where answers are expected to satisfy some property related to edit distance.

8 questions
Filter by
Sorted by
Tagged with
1k views

### Find The Average String Between Two Strings

Inspired by this Your task today: given two strings, find the string with the lowest maximum Levenshtein distance to the input strings. For example, using Steffan ...
309 views

### Find the closest swap

Take as input two strings $A$ and $B$. Output a string $C$ that is $A$ but with two characters swapped such that the Levenshtein distance $d(C,B)$ is as small as possible. You must swap ...
1k views

### Damerau-Damerau distance

Given a list of the integers from $1$ to some $n$, give the minimum number of adjacent swaps required to put the list in ascending order. You will receive a list as input and should output a non-...
1k views

### Levenshtein distance & OEIS (Robbers)

This is the Robber post. The Cop post is here. Your task is to take an integer input N and output the Nth digit in the sequence OEIS A002942. The sequence consists of the square numbers written ...
2k views

### Levenshtein distance & OEIS (Cops)

This is the Cop post. The Robber post is here. Your task is to take an integer input N and output the Nth digit in the sequence OEIS A002942. The sequence consists of the square numbers written ...
4k views

### Levenshtein Distance

While there are many edit distance questions, such as this one, there isn't a simple question to write a program that calculates the Levenshtein distance. Some Exposition The Levenshtein edit ...