Linked Questions

3 votes
2 answers
199 views

Create an auto-cucumber program [duplicate]

Oops, Auto-correct. You have a word. But it's wrong. You wonder what word it would be. Thankfully, being a code golfer, You can make a code to take a rough guess. I/O You will be given a (wrong, ...
  • 5,333
59 votes
18 answers
4k views

There are two new sheriffs in town – Identifying DJMcMego pairs!

We have some new sheriffs moderators in town, Mego and DJMcMayhem. We need a challenge to properly honour them for their new positions, so there we go. Here's something that has caught my attention ...
  • 41.9k
25 votes
14 answers
3k views

Reuse your code!

In this challenge we try to solve two important problems at once. They are: Given integers \$a\$ and \$b\$, tell if \$a^b-1\$ is a prime number. Given integers \$a\$ and \$b\$, return \$a\choose b\$. ...
  • 5,087
19 votes
6 answers
3k views

I don't like change!

Input: Two strings without newlines or whitespaces. Output: Both input strings on separate lines, with spaces where necessary† for one of the two strings. And a third line with the characters ...
11 votes
6 answers
579 views

Levenshtein Your Source

The Levenshtein edit distance between two strings is the minimum possible number of insertions, deletions, or substitutions to convert one word into another word. In this case, each insertion, ...
  • 13.6k
8 votes
5 answers
558 views

I misspelled my domayn name

According to Alexa rankings, the top 10 websites are: ...
  • 3,899
21 votes
2 answers
978 views

Each step of the Levenshtein distance

In this challenge you will write a program that takes two newline-separated strings, s1 (the first line) and s2 (the second line), as input (STDIN or closest). You can assume that the length of s1 ...
  • 8,050
9 votes
5 answers
320 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 ...
  • 92.5k
9 votes
4 answers
607 views

Edit distance where a substitution only costs the first time

This challenge is about the following variant of edit distance. Say we have a cost of 1 for inserts, deletes and substitutions as usual with one exception. A substitution for a given letter ...
user avatar
11 votes
3 answers
530 views

Challenge Similarity Detector

Challenge Given two question IDs, try to figure out how similar they are by looking at the answers. Details You will be given two question IDs for ...
  • 40.6k
4 votes
1 answer
2k views

String Similarity using Jaro-Winkler

String Similarity String similarity is basically a ratio of how similar one string is to another. This can be calculated in many ways, and there are various algorithms out there for implementing a ...