Levenshtein Distance

Levenshtein Distance or edit distance between two strings is the number of single character edits to be made to convert one string to another. The edit can be an insertion, deletion or substitution.

Eg: Levenshtein distance between 'Choose' and 'Shoes' is 3.
  1. Substitute 'C' with 'S'
  2. Substitute 2nd 'o' with 'e'
  3. Delete 's'

C h o o s e
S h o o s e
S h o e s e
S h o e s _

The Damerau–Levenshtein Distance is also an edit distance between two strings but it includes one more edit operation viz transposition.

Eg: Damerau–Levenshtein distance 'Reign' and 'Field' is 4
  1. Substitute 'R' with 'F'
  2. Transpose 'i' and 'e'
  3. Substitute 'g' with 'l'
  4. Substitute 'n' with 'd'

R e i g n
F e i g n
F i e g n
F i e l n
F i e l d
Levenshtein distance between 'Reign' and 'Field' is 5.


Inaugural Indian PostgreSQL User Group Meetup!


This was a memento given for the first meetup of Postgres Users in and around Pune at BMC Software, Pune.


It was a success. Around 30 people , newbies to developers from different companies had come. There were presentations on Streaming Replication, HA and Postgres XC. The content was good and had learnt quite a lot!...


This was a great experience, it encouraged and motivated me to continue contributing to the community! Hope there are more such meetups and I get to present my contributions too. :-)